[PHP-CVS] com php-src: - fix bug #47358, glob returns error, should be empty array(): ext/standard/dir.c
Commit:50ceeb9f750cecedc483ffc3d3e65a3324e21866 Author:Pierre Joye Tue, 8 Jan 2013 15:02:04 +0100 Parents: bcb3ad043aa36d56945960bf985a673f938711de Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=50ceeb9f750cecedc483ffc3d3e65a3324e21866 Log: - fix bug #47358, glob returns error, should be empty array() Bugs: https://bugs.php.net/47358 Changed paths: M ext/standard/dir.c Diff: diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 37c3bc8..3f70ea9 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -496,9 +496,7 @@ PHP_FUNCTION(glob) if (!globbuf.gl_pathc || !globbuf.gl_pathv) { no_results: if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) { - struct stat s; - - if (0 != VCWD_STAT(pattern, &s) || S_IFDIR != (s.st_mode & S_IFMT)) { + if (php_check_open_basedir_ex(pattern, 0 TSRMLS_CC)) { RETURN_FALSE; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: - fix bug #47358, glob returns error, should be empty array(): ext/standard/dir.c
Commit:2fb7cd30c59345838588ba89ad8b05cc4c34d6dd Author:Pierre Joye Tue, 8 Jan 2013 15:06:58 +0100 Parents: a71e91626a3a72d360c285d0c78a16dbac6a0840 50ceeb9f750cecedc483ffc3d3e65a3324e21866 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2fb7cd30c59345838588ba89ad8b05cc4c34d6dd Log: - fix bug #47358, glob returns error, should be empty array() Bugs: https://bugs.php.net/47358 Changed paths: MM ext/standard/dir.c Diff: diff --cc ext/standard/dir.c index d921f7c,3f70ea9..91d1e04 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@@ -491,10 -495,8 +491,8 @@@ PHP_FUNCTION(glob /* now catch the FreeBSD style of "no matches" */ if (!globbuf.gl_pathc || !globbuf.gl_pathv) { no_results: - if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) { + if (PG(open_basedir) && *PG(open_basedir)) { - struct stat s; - - if (0 != VCWD_STAT(pattern, &s) || S_IFDIR != (s.st_mode & S_IFMT)) { + if (php_check_open_basedir_ex(pattern, 0 TSRMLS_CC)) { RETURN_FALSE; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php