From: Marcus Boerger Date: Tue, 5 Feb 2008 19:06:59 +0000 (+0000) Subject: - Fix cross class tree reference issues with callbacks X-Git-Tag: RELEASE_2_0_0a1~605 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c377ca19f53733662c225df7f0f53aa5c103053;p=php - Fix cross class tree reference issues with callbacks --- 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);