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

Bug #17257 Corruupted zip file
Submitted: 2010-03-24 15:49 UTC
From: uttam27 Assigned: doconnor
Status: Closed Package: File_Archive (version 1.5.4)
PHP Version: 5.3.2 OS: Windows XP SP3
Roadmaps: (Not assigned)    
Subscription  


 [2010-03-24 15:49 UTC] uttam27 (Uttam Shukla)
Description: ------------ The behaviour of passing object by reference has changed in PHP 5.3 due to which there is a php error when trying to create zip file. Test script: --------------- <?php require_once "File/Archive.php"; $filestozip=array('file1.txt','file2.txt','file3.txt'); $filename = "test.zip"; File_Archive::setOption("zipCompressionLevel", 9); File_Archive::extract($filestozip, File_Archive::toArchive($filename, File_Archive::toOutput())); ?> Expected result: ---------------- Zip file with files file1.txt, file2.txt, file3.txt Actual result: -------------- Corrupted zip file and following error in php error log file: PHP Deprecated: Assigning the return value of new by reference is deprecated in C:\Inetpub\PHP\PEAR\File\Archive.php on line 363

Comments

 [2010-03-24 15:58 UTC] uttam27 (Uttam Shukla)
If the '&' before 'new' is deleted at line # 363 in Archive.php, it works.
 [2010-09-06 19:00 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Closed -Assigned To: +Assigned To: doconnor
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. At least in one place.