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

Bug #4743 PHP 5.1 pass-by-reference error
Submitted: 2005-07-05 01:32 UTC
From: jon Assigned: cellog
Status: Closed Package: PEAR_PackageFileManager
PHP Version: 5_1 CVS-2005-07-04 OS: FreeBSD
Roadmaps: (Not assigned)    
Subscription  


 [2005-07-05 01:32 UTC] jon
Description: ------------ [Using PEAR_PackageFileManager 1.5.2] It would appear that PHP's array_pop() function now strictly requires its array argument to be passed by reference. Line 108 of PackageFileManager/File.php attempts to pass the return value of explode() to array_pop(), which has pass-by-value semantics. This results in a fatal PHP error. A simple fix involves splitting that line in two: $parts = explode('.', $file); $ext = array_pop($parts); A more elegant solution probably exists, as well. Actual result: -------------- Fatal error: Only variables can be passed by reference in /usr/local/lib/php/PEAR/PackageFileManager/File.php on line 108

Comments

 [2005-07-11 11:07 UTC] jason at hybd dot net
This a PHP 5.1 bug imo. Reported to Zend in http://bugs.php.net/33643
 [2005-07-21 04:16 UTC] cellog
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. *grumble*