ID: 33047 Updated by: [EMAIL PROTECTED] Reported By: wiseman1024 at gmail dot com -Status: Open +Status: Feedback Bug Type: Directory function related Operating System: Windows 2000 PHP Version: 4.3.9 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-05-17 18:09:30] wiseman1024 at gmail dot com Description: ------------ glob() won't work (with any pattern and options whatsoever) when one directory in the current working path has matching brackets [ and ] with characters between the brackets. This means glob() will fail if the current working directory is one of: C:\php\[hello] C:\php\[hello]\hello C:\php\xxx[hello]xxx C:\php\[hello][ It will work, for example, if the current working directory is one of: C:\php C:\php\[hello C:\php\hello] C:\php\hello[] This seems to be a problem when using regular expressions in the implementation of glob. Reproduce code: --------------- /* Returns a list of files and directories, unless inside a directory with something between brackets*/ print_r(glob('*',FALSE)); Expected result: ---------------- Should always return an array with the files (assuming there are files in the current directory) Actual result: -------------- Nothing, because glob() returned false ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33047&edit=1