Browse Source

- fix bug #47358, glob returns error, should be empty array()

Conflicts:
	ext/standard/dir.c
pull/797/head
Pierre Joye 14 years ago
committed by Stanislav Malyshev
parent
commit
481c4715d4
  1. 3
      NEWS
  2. 4
      ext/standard/dir.c
  3. 3
      ext/standard/tests/file/glob_variation3.phpt

3
NEWS

@ -2,6 +2,9 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2014, PHP 5.4.33
- Core:
. Fixed bug #47358 (glob returns error, should be empty array()). (Pierre)
- OpenSSL:
. Fixed bug #41631 (socket timeouts not honored in blocking SSL reads)
(Daniel Lowrey).

4
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;
}
}

3
ext/standard/tests/file/glob_variation3.phpt

@ -15,5 +15,6 @@ var_dump(glob("$path/*.none"));
--EXPECT--
array(0) {
}
bool(false)
array(0) {
}
==DONE==
Loading…
Cancel
Save