Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MFH: - Changed opendir/dir/scandir to use default context when no con…

…text argument is passed. (Sara)
  • Loading branch information...
commit 336cb15d69979ee5cc5d9dcd6d25960b6ffbc17d 1 parent d8edbd2
@bjori bjori authored
Showing with 4 additions and 6 deletions.
  1. +2 −0  NEWS
  2. +2 −6 ext/standard/dir.c
View
2  NEWS
@@ -1,6 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 200?, PHP 5.3.0 Alpha 4
+- Changed opendir/dir/scandir to use default context
+ when no context argument is passed. (Sara)
04 Dec 2008, PHP 5.3.0 Alpha 3
- Upgraded bundled PCRE to version 7.8. (Nuno)
View
8 ext/standard/dir.c
@@ -213,9 +213,7 @@ static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject)
RETURN_NULL();
}
- if (zcontext) {
- context = php_stream_context_from_zval(zcontext, 0);
- }
+ context = php_stream_context_from_zval(zcontext, 0);
dirp = php_stream_opendir(dirname, ENFORCE_SAFE_MODE|REPORT_ERRORS, context);
@@ -558,9 +556,7 @@ PHP_FUNCTION(scandir)
RETURN_FALSE;
}
- if (zcontext) {
- context = php_stream_context_from_zval(zcontext, 0);
- }
+ context = php_stream_context_from_zval(zcontext, 0);
if (!flags) {
n = php_stream_scandir(dirn, &namelist, context, (void *) php_stream_dirent_alphasort);
Please sign in to comment.
Something went wrong with that request. Please try again.