From: Dmitry Stogov Date: Fri, 3 Mar 2006 12:06:29 +0000 (+0000) Subject: Fixed incorrect backtrace type ("::" instead of "->") for __set()/__get() X-Git-Tag: php-5.1.3RC1~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=54adfc6fcf04b19f43b15f2ed498e68969dda96b;p=php Fixed incorrect backtrace type ("::" instead of "->") for __set()/__get() --- diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index ea89f093d5..5aa35113ab 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -608,6 +608,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS execute_data = *EG(current_execute_data); EX(op_array) = NULL; EX(opline) = NULL; + EX(object) = NULL; } else { /* This only happens when we're called outside any execute()'s * It shouldn't be strictly necessary to NULL execute_data out, @@ -663,6 +664,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS ce = &(EG(active_op_array)->scope); found = (*ce != NULL?SUCCESS:FAILURE); fci->object_pp = EG(This)?&EG(This):NULL; + EX(object) = EG(This); } else if (strcmp(Z_STRVAL_PP(fci->object_pp), "parent") == 0 && EG(active_op_array)) { if (!EG(active_op_array)->scope) { @@ -674,6 +676,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS ce = &(EG(active_op_array)->scope->parent); found = (*ce != NULL?SUCCESS:FAILURE); fci->object_pp = EG(This)?&EG(This):NULL; + EX(object) = EG(This); } else { zend_class_entry *scope; scope = EG(active_op_array) ? EG(active_op_array)->scope : NULL; @@ -686,6 +689,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS instanceof_function(Z_OBJCE_P(EG(This)), scope TSRMLS_CC) && instanceof_function(scope, *ce TSRMLS_CC)) { fci->object_pp = &EG(This); + EX(object) = EG(This); } else { fci->object_pp = NULL; } @@ -802,6 +806,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS EX(function_state).function = fci_cache->function_handler; calling_scope = fci_cache->calling_scope; fci->object_pp = fci_cache->object_pp; + EX(object) = fci->object_pp ? *fci->object_pp : NULL; } if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) {