From: Etienne Kneuss Date: Wed, 9 Apr 2008 19:00:48 +0000 (+0000) Subject: Fix #44511 (Ensure no exception was already thrown by php_stream_opendir) X-Git-Tag: RELEASE_2_0_0b1~476 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6df935264bd3ccedd838f540f93f9105707af88;p=php 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 32b6fd0974..37a8637ece 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -236,7 +236,7 @@ static void spl_filesystem_dir_open(spl_filesystem_object* intern, zend_uchar ty } 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 {