]> granicus.if.org Git - php/commitdiff
Fix __autoload() with derived classes
authorMarcus Boerger <helly@php.net>
Mon, 29 Dec 2003 12:35:44 +0000 (12:35 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 29 Dec 2003 12:35:44 +0000 (12:35 +0000)
Zend/zend_execute_API.c

index 058e713ff880eb3318d117d80c5dd925c7829fc5..36c3cfe77b67a88b2ab892de2cc201378d2ba17b 100644 (file)
@@ -1131,6 +1131,7 @@ void zend_unset_timeout(TSRMLS_D)
 zend_class_entry *zend_fetch_class(char *class_name, uint class_name_len, int fetch_type TSRMLS_DC)
 {
        zend_class_entry **pce;
+       zend_bool in_autoload;
 
 check_fetch_type:
        switch (fetch_type) {
@@ -1156,9 +1157,13 @@ check_fetch_type:
                        break;
        }
 
+       in_autoload = EG(in_autoload);
+       EG(in_autoload) = 0;
        if (zend_lookup_class(class_name, class_name_len, &pce TSRMLS_CC)==FAILURE) {
+               EG(in_autoload) = in_autoload;
                zend_error(E_ERROR, "Class '%s' not found", class_name);
        }
+       EG(in_autoload) = in_autoload;
        return *pce;
 }