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

Bug #6173 Providing an empty string as parameter causes (almost) unlimited loop
Submitted: 2005-12-06 14:17 UTC Modified: 2006-02-02 06:56 UTC
From: kouber Assigned: tuupola
Status: Closed Package: File_Find
PHP Version: 5.0.4 OS: Windows
Roadmaps: (Not assigned)    
Subscription  


 [2005-12-06 14:17 UTC] kouber
Description: ------------ Providing an empty string or NULL for the first parameter in File_Find::search() causes a warning and loops (almost) forever. It would be good to have a check for empty strings or null values. :) Test script: --------------- <? require_once 'File/Find.php'; var_dump(File_Find::search('', '.')); ?> Expected result: ---------------- array(0) { } Actual result: -------------- Warning: ereg(): REG_EMPTY in C:\php\PEAR\pear\File\Find.php on line 242 Warning: ereg(): REG_EMPTY in C:\php\PEAR\pear\File\Find.php on line 242 Warning: ereg(): REG_EMPTY in C:\php\PEAR\pear\File\Find.php on line 242 Warning: ereg(): REG_EMPTY in C:\php\PEAR\pear\File\Find.php on line 242 Warning: ereg(): REG_EMPTY in C:\php\PEAR\pear\File\Find.php on line 242 ... array(0) { }

Comments

 [2006-02-02 06:56 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.