Skip to content

Commit bacfeed

Browse files
committed
review+NEWS
1 parent 3e44f49 commit bacfeed

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ PHP NEWS
123123
defaulted to 0. (Jorg Sowa)
124124
. Fixed bug GH-21058 (error_log() crashes with message_type 3 and
125125
null destination). (David Carlier)
126+
. Fixed bug GH-13204 (glob() fails if square bracket is in current directory).
127+
(ndossche)
126128

127129
- Streams:
128130
. Added so_keepalive, tcp_keepidle, tcp_keepintvl and tcp_keepcnt stream

ext/standard/dir.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,28 +467,28 @@ PHP_FUNCTION(glob)
467467
* to prepending the current working directory to the passed path.
468468
* However, that comes with limitations regarding meta characters
469469
* that is not solvable in general (GH-13204). */
470-
#ifdef PHP_GLOB_ALTDIRFUNC
470+
# ifdef PHP_GLOB_ALTDIRFUNC
471471
globbuf.gl_opendir = php_glob_opendir_wrapper;
472472
globbuf.gl_readdir = (struct dirent *(*)(void *)) readdir;
473473
globbuf.gl_closedir = php_glob_closedir_wrapper;
474474
globbuf.gl_lstat = php_glob_lstat_wrapper;
475475
globbuf.gl_stat = php_glob_stat_wrapper;
476476
passed_glob_flags |= PHP_GLOB_ALTDIRFUNC;
477-
#else
477+
# else
478478
char *result = VCWD_GETCWD(cwd, MAXPATHLEN);
479479
if (!result) {
480480
cwd[0] = '\0';
481481
}
482-
#ifdef PHP_WIN32
482+
# ifdef PHP_WIN32
483483
if (IS_SLASH(*pattern)) {
484484
cwd[2] = '\0';
485485
}
486-
#endif
486+
# endif
487487
cwd_skip = strlen(cwd)+1;
488488

489489
snprintf(work_pattern, MAXPATHLEN, "%s%c%s", cwd, DEFAULT_SLASH, pattern);
490490
pattern = work_pattern;
491-
#endif
491+
# endif
492492
}
493493
#endif
494494

0 commit comments

Comments
 (0)