diff options
| -rw-r--r-- | NEWS | 1 | ||||
| -rw-r--r-- | ext/standard/dir.c | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -8,6 +8,7 @@ - Fixed signature generation/validation for zip archives in ext/phar. (Greg) - Fixed memory leak in stream_is_local(). (Felipe) +- Fixed bug #49108 (2nd scan_dir produces seg fault). (Felipe) - Fixed bug #49065 ("disable_functions" php.ini option does not work on Zend extensions). (Stas) - Fixed bug #49064 (--enable-session=shared does not work: undefined symbol: diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 31566d3398..5beaae25f5 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -556,7 +556,9 @@ PHP_FUNCTION(scandir) RETURN_FALSE; } - context = php_stream_context_from_zval(zcontext, 0); + if (zcontext) { + context = php_stream_context_from_zval(zcontext, 0); + } if (!flags) { n = php_stream_scandir(dirn, &namelist, context, (void *) php_stream_dirent_alphasort); |
