diff options
author | Pierre Joye <pierre.php@gmail.com> | 2013-01-08 15:02:04 +0100 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2014-08-14 16:56:22 -0700 |
commit | 481c4715d4f4c77293d65216324215f671954660 (patch) | |
tree | 9ba4f7b09b4b32a462c1e8a3e2147bf83ebb6ea3 /ext/standard | |
parent | aeb633543bbd571d7fb440d54ae3b0f1a4dfece7 (diff) | |
download | php-git-481c4715d4f4c77293d65216324215f671954660.tar.gz |
- fix bug #47358, glob returns error, should be empty array()
Conflicts:
ext/standard/dir.c
Diffstat (limited to 'ext/standard')
-rw-r--r-- | ext/standard/dir.c | 4 | ||||
-rw-r--r-- | ext/standard/tests/file/glob_variation3.phpt | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/ext/standard/dir.c b/ext/standard/dir.c index c6d6ddd263..f39789a5c9 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -492,9 +492,7 @@ PHP_FUNCTION(glob) if (!globbuf.gl_pathc || !globbuf.gl_pathv) { no_results: 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; } } diff --git a/ext/standard/tests/file/glob_variation3.phpt b/ext/standard/tests/file/glob_variation3.phpt index 9e1e28baf9..4f504e668c 100644 --- a/ext/standard/tests/file/glob_variation3.phpt +++ b/ext/standard/tests/file/glob_variation3.phpt @@ -15,5 +15,6 @@ var_dump(glob("$path/*.none")); --EXPECT-- array(0) { } -bool(false) +array(0) { +} ==DONE== |