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

Bug #5892 Reference issues with PHP 4.4.x
Submitted: 2005-11-08 06:02 UTC Modified: 2006-02-02 08:05 UTC
From: saramaca at libertysurf dot fr Assigned: tuupola
Status: Closed Package: File_Find
PHP Version: 4.4.1 OS: FreeBSD
Roadmaps: (Not assigned)    
Subscription  


 [2005-11-08 06:02 UTC] saramaca at libertysurf dot fr
Description: ------------ Version 1.2.0 Release Date 2005-10-04 Release State stable Last Modified 2005-11-07 Test script: --------------- I have no test script but please refer to Derick Rethans' article (http://ez.no/community/articles/reference_issues) I peeked inside File_Find source code and spotted several potential issues with methods returning references... Actual result: -------------- PHP Notice: Only variable references should be returned by reference in /usr/local/www/lib/php/File/Find.php on line 96

Comments

 [2006-02-01 15:27 UTC] mjohnson at pitsco dot com
At least one spot can be fixed with this patch: --- /usr/share/php/File/Find.php 2005-10-21 16:51:54.000000000 -0500 +++ Find.php 2006-02-01 13:33:54.849479182 -0600 @@ -92,8 +92,12 @@ } @closedir($dh); - - return (count($matches) > 0) ? $matches : null; + + if (count($matches) == 0) { + $metches = NULL; + } + + return $matches; } /**
 [2006-02-02 08:05 UTC] tuupola at php dot net
This bug has been fixed in CVS. 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.