Browse Source

Use the default stream context for FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator

pull/271/head
Hannes Magnusson 14 years ago
parent
commit
3dabada846
  1. 4
      NEWS
  2. 2
      ext/spl/spl_directory.c

4
NEWS

@ -17,6 +17,10 @@ PHP NEWS
. Fixed bug #55544 (ob_gzhandler always conflicts with
zlib.output_compression). (Mike)
- SPL:
. FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use
the default stream context. (Hannes)
- CLI SAPI:
. Fixed bug #55726 (Changing the working directory makes router script
inaccessible). (Laruence)

2
ext/spl/spl_directory.c

@ -225,7 +225,7 @@ static void spl_filesystem_dir_open(spl_filesystem_object* intern, char *path TS
intern->type = SPL_FS_DIR;
intern->_path_len = strlen(path);
intern->u.dir.dirp = php_stream_opendir(path, REPORT_ERRORS, NULL);
intern->u.dir.dirp = php_stream_opendir(path, REPORT_ERRORS, FG(default_context));
if (intern->_path_len > 1 && IS_SLASH_AT(path, intern->_path_len-1)) {
intern->_path = estrndup(path, --intern->_path_len);

Loading…
Cancel
Save