mirror of
https://github.com/php/php-src.git
synced 2025-08-21 01:45:16 +02:00
MFH: - Changed opendir/dir/scandir to use default context when no context argument is passed. (Sara)
This commit is contained in:
parent
d8edbd2729
commit
336cb15d69
2 changed files with 4 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue