From: Etienne Kneuss Date: Wed, 9 Apr 2008 19:01:12 +0000 (+0000) Subject: MFH: Fix #44511 (Ensure no exception was already thrown by php_stream_opendir) X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~408 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=54b70b6015addfa36b8d28b26db2b40b982c2546;p=php MFH: Fix #44511 (Ensure no exception was already thrown by php_stream_opendir) --- diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 96fc5e781b..41328c20cc 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -215,7 +215,7 @@ static void spl_filesystem_dir_open(spl_filesystem_object* intern, char *path TS } intern->u.dir.index = 0; - if (intern->u.dir.dirp == NULL) { + if (EG(exception) || intern->u.dir.dirp == NULL) { /* throw exception: should've been already happened */ intern->u.dir.entry.d_name[0] = '\0'; } else {