mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
- fix bug #47358, glob returns error, should be empty array()
This commit is contained in:
parent
bcb3ad043a
commit
50ceeb9f75
1 changed files with 1 additions and 3 deletions
|
@ -496,9 +496,7 @@ PHP_FUNCTION(glob)
|
||||||
if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
|
if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
|
||||||
no_results:
|
no_results:
|
||||||
if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
|
if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
|
||||||
struct stat s;
|
if (php_check_open_basedir_ex(pattern, 0 TSRMLS_CC)) {
|
||||||
|
|
||||||
if (0 != VCWD_STAT(pattern, &s) || S_IFDIR != (s.st_mode & S_IFMT)) {
|
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue