From 03e039b19d7fcf7880eb0b56c82661ec6d50bac8 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Mon, 29 Dec 2003 12:35:44 +0000 Subject: [PATCH] Fix __autoload() with derived classes --- Zend/zend_execute_API.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 058e713ff8..36c3cfe77b 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -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; } -- 2.50.1