]> granicus.if.org Git - php/commitdiff
- Fix crash when exception is raised in __autoload function
authorAndi Gutmans <andi@php.net>
Tue, 13 Aug 2002 16:46:40 +0000 (16:46 +0000)
committerAndi Gutmans <andi@php.net>
Tue, 13 Aug 2002 16:46:40 +0000 (16:46 +0000)
Zend/zend_execute_API.c

index 426379bc22c3390664babc628f387e1dc6127a32..bb14adf93d322b1ae7c2098cd76185e8fc134c80 100644 (file)
@@ -670,6 +670,11 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
                return FAILURE;
        }
 
+       if (EG(exception)) {
+               zend_error(E_ERROR, "__autoload threw an exception");
+       }
+
+       /* If an exception is thrown retval_ptr will be NULL but we bailout before we reach this point */
        zval_ptr_dtor(&retval_ptr);
 
        return zend_hash_find(EG(class_table), name, name_length + 1, (void **) ce);