diff options
author | Pierre Joye <pierre.php@gmail.com> | 2013-01-08 15:02:04 +0100 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2013-01-08 15:02:04 +0100 |
commit | 50ceeb9f750cecedc483ffc3d3e65a3324e21866 (patch) | |
tree | c52ef8eb72c70b3bfd787b6c5c79eb4f58653c89 | |
parent | bcb3ad043aa36d56945960bf985a673f938711de (diff) | |
download | php-git-50ceeb9f750cecedc483ffc3d3e65a3324e21866.tar.gz |
- fix bug #47358, glob returns error, should be empty array()
-rw-r--r-- | ext/standard/dir.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 37c3bc88c6..3f70ea94f5 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; } } |