From: acoon at acoon dot dk Operating system: FreeBSD 4.5 PHP version: 4.3.2 PHP Bug Type: *Directory/Filesystem functions Bug description: GLOB_ONLYDIR is not working
Description: ------------ When using GLOB_ONLYDIR on FreeBSD 4.5 is returns an error. PHP was configured like this. './configure' '--with-mysql' '--with-apxs=/usr/local/sbin/apxs' '--with-curl' '--with-gd' '--with-jpeg-dir=/usr/local/include/' '--with-zlib-dir' '--enable-ftp' '--with-ttf' '--enable-bcmath' Changes made to php.ini: register_globals = On Reproduce code: --------------- <?php foreach (glob("*", GLOB_ONLYDIR) as $dir) { print "$dir is a dir!<BR>"; } ?> Expected result: ---------------- I would expect to get all dirs printet. Actual result: -------------- Warning: glob() expects parameter 2 to be long, string given in index.php on line 43 -- Edit bug report at http://bugs.php.net/?id=24482&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24482&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24482&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24482&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24482&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24482&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24482&r=support Expected behavior: http://bugs.php.net/fix.php?id=24482&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24482&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24482&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24482&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24482&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24482&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24482&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24482&r=gnused