From 7c377ca19f53733662c225df7f0f53aa5c103053 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 5 Feb 2008 19:06:59 +0000 Subject: [PATCH] - Fix cross class tree reference issues with callbacks --- Zend/zend_API.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index df5356b25d..305444e1f9 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2721,7 +2721,10 @@ static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, ze if (colon.v != NULL) { /* This is a compound name. * Try to fetch class and then find static method. */ + zend_class_entry *last_scope = EG(scope); + EG(scope) = ce_org; *ce_ptr = zend_u_fetch_class(Z_TYPE_P(callable), Z_UNIVAL_P(callable), clen, ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_SILENT TSRMLS_CC); + EG(scope) = last_scope; if (!*ce_ptr) { char *cname = estrndup(Z_STRVAL_P(callable), clen); if (error) zend_spprintf(error, 0, "class '%v' not found", cname); -- 2.40.0