Edit report at https://bugs.php.net/bug.php?id=47358&edit=1
ID: 47358 Updated by: paj...@php.net Reported by: php at guggemand dot dk Summary: glob returns error, should be empty array() -Status: Assigned +Status: Closed Type: Bug Package: Safe Mode/open_basedir Operating System: FreeBSD 7.1 PHP Version: 5.2.9RC1 Assigned To: pajoye Block user comment: N Private report: N New Comment: Automatic comment on behalf of pierre....@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=2fb7cd30c59345838588ba89ad8b05cc4c34d6dd Log: - fix bug #47358, glob returns error, should be empty array() Previous Comments: ------------------------------------------------------------------------ [2012-11-09 14:09:05] manuel-php at mausz dot at Hi Pierre! Please merge your patch asap to php. It works as expected and will fix the following inconsistency: $ php -dopen_basedir=/ -r 'var_dump(glob("/does/not/exist"));' bool(false) $ php -r 'var_dump(glob("/does/not/exist"));' array(0) { } Something to consider is updating the docs to mention returning false if open_basedir restriction is in effect. ------------------------------------------------------------------------ [2011-10-09 17:08:22] paj...@php.net The following patch has been added/updated: Patch Name: open_basedir_error_fix Revision: 1318180102 URL: https://bugs.php.net/patch-display.php?bug=47358&patch=open_basedir_error_fix&revision=1318180102 ------------------------------------------------------------------------ [2011-10-09 16:51:14] paj...@php.net Please try using this patch (against 5.4 but should work against 5.3). I will remove the warning too to make it works like the other call (was just to ease the test). ------------------------------------------------------------------------ [2011-10-09 16:50:22] paj...@php.net The following patch has been added/updated: Patch Name: open_basedir_error_fix Revision: 1318179021 URL: https://bugs.php.net/patch-display.php?bug=47358&patch=open_basedir_error_fix&revision=1318179021 ------------------------------------------------------------------------ [2011-10-09 16:39:03] paj...@php.net I agree, there is no error here but a wrong test. I will fix it soonish, checking the logic in there. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=47358 -- Edit this bug report at https://bugs.php.net/bug.php?id=47358&edit=1