Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.5

Bug #17046 AddDirectory.php calls parent constructor incorrectly
Submitted: 2010-01-30 21:15 UTC
From: ahmetsacan Assigned: cbrunet
Status: Closed Package: File_Archive (version 1.5.4)
PHP Version: 5.3.0 OS: Windows Vista
Roadmaps: (Not assigned)    
Subscription  


 [2010-01-30 21:15 UTC] ahmetsacan (Ahmet Sacan)
Description: ------------ In File\Archive\Reader\ChangeName\AddDirectory.php:50 the parent's constructor is not called properly. parent::__construct() needs to be used. Test script: --------------- require_once "File/Archive.php"; File_Archive::setOption('zipCompressionLevel', 3); File_Archive::extract( "/path/to/a/directory", File_Archive::toArchive( "newzipfilename.zip", File_Archive::toOutput() ) ); Actual result: -------------- Fatal error: Call to undefined method File_Archive_Reader_ChangeName::File_Archive_Reader_ChangeName() in ...\PEAR\File\Archive\Reader\ChangeName\AddDirectory.php on line 50

Comments

 [2010-01-30 21:20 UTC] ahmetsacan (Ahmet Sacan)
 [2010-02-09 05:07 UTC] doconnor (Daniel O'Connor)
Keep in mind, File_Archive has to retain BC for PHP4, which does not understand the __construct method.
 [2010-02-09 05:31 UTC] doconnor (Daniel O'Connor)
 [2010-02-09 05:32 UTC] doconnor (Daniel O'Connor)
Attached patch goes half way, and fixes a bug with File_Archive_Predicate_Or vs the constructor. If I wasn't lazy, I'd point all of the old PHP4 constructors at __construct instead of vice versa.
 [2010-02-09 05:32 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Analyzed
 [2010-02-09 05:33 UTC] doconnor (Daniel O'Connor)
-Assigned To: +Assigned To: cbrunet
 [2010-03-07 19:00 UTC] cbrunet (Charles Brunet)
-Status: Analyzed +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I simply added the missing File_Archive_Reader_ChangeName constructor. I should resolve the issue.