]> granicus.if.org Git - php/commitdiff
Fix #44511 (Ensure no exception was already thrown by php_stream_opendir)
authorEtienne Kneuss <colder@php.net>
Wed, 9 Apr 2008 19:00:48 +0000 (19:00 +0000)
committerEtienne Kneuss <colder@php.net>
Wed, 9 Apr 2008 19:00:48 +0000 (19:00 +0000)
ext/spl/spl_directory.c

index 32b6fd09747ef853b799b2f4a378a58eb01f49b5..37a8637ece2b8e4dfa1db4cde14c04412dc25927 100755 (executable)
@@ -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 {