summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2008-02-05 19:08:24 +0000
committerMarcus Boerger <helly@php.net>2008-02-05 19:08:24 +0000
commit0976a2646a10384957a848c8815a906c8330a85c (patch)
tree771a0e695add014fca46074c811dd0669759c098 /Zend/zend_API.c
parent6e9ef8e316ebd95aeca1460beafef20d6a6c2281 (diff)
downloadphp-git-0976a2646a10384957a848c8815a906c8330a85c.tar.gz
- MFH Fix cross class tree reference issues with callbacks (colder,helly)
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 05ab18d5f5..db63c01b74 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2359,7 +2359,10 @@ static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, ze
/* This is a compound name.
* Try to fetch class and then find static method. */
- *ce_ptr = zend_fetch_class(Z_STRVAL_P(callable), clen, ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_SILENT TSRMLS_CC);
+ zend_class_entry *last_scope = EG(scope);
+ EG(scope) = ce_org;
+ *ce_ptr = zend_fetch_class(Z_STRVAL_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 '%s' not found", cname);
@@ -2375,7 +2378,7 @@ static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, ze
} else if (ce_org) {
/* Try to fetch find static method of given class. */
mlen = Z_STRLEN_P(callable);
- lmname = zend_str_tolower_dup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
+ lmname = zend_str_tolower_dup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
ftable = &ce_org->function_table;
*ce_ptr = ce_org;
} else {