Permalink
Browse files

Use the default stream context for FilesystemIterator, GlobIterator a…

…nd (Recursive)DirectoryIterator
  • Loading branch information...
1 parent 0e6250f commit 3dabada846d762afb58409c205c6bce9a6f6bb2b @bjori bjori committed Sep 30, 2011
Showing with 5 additions and 1 deletion.
  1. +4 −0 NEWS
  2. +1 −1 ext/spl/spl_directory.c
View
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)
View
@@ -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);

0 comments on commit 3dabada

Please sign in to comment.