]> granicus.if.org Git - php/commitdiff
- Fix cross class tree reference issues with callbacks
authorMarcus Boerger <helly@php.net>
Tue, 5 Feb 2008 19:06:59 +0000 (19:06 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 5 Feb 2008 19:06:59 +0000 (19:06 +0000)
Zend/zend_API.c

index df5356b25d3c3e0ed6bb5695bccf3cd5fc75da9c..305444e1f90a303aea579e1b652dc5ee9eb4416e 100644 (file)
@@ -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);