diff options
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r-- | ext/standard/basic_functions.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 44c3127607..147ea0a767 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4786,15 +4786,15 @@ PHP_FUNCTION(forward_static_call) return; } - if (!EG(current_execute_data)->prev_execute_data->func->common.scope) { + if (!EX(prev_execute_data)->func->common.scope) { zend_error(E_ERROR, "Cannot call forward_static_call() when no class scope is active"); } fci.retval = &retval; - if (EG(current_execute_data)->called_scope && - instanceof_function(EG(current_execute_data)->called_scope, fci_cache.calling_scope TSRMLS_CC)) { - fci_cache.called_scope = EG(current_execute_data)->called_scope; + if (EX(called_scope) && + instanceof_function(EX(called_scope), fci_cache.calling_scope TSRMLS_CC)) { + fci_cache.called_scope = EX(called_scope); } if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && Z_TYPE(retval) != IS_UNDEF) { @@ -4818,9 +4818,9 @@ PHP_FUNCTION(forward_static_call_array) zend_fcall_info_args(&fci, params TSRMLS_CC); fci.retval = &retval; - if (EG(current_execute_data)->called_scope && - instanceof_function(EG(current_execute_data)->called_scope, fci_cache.calling_scope TSRMLS_CC)) { - fci_cache.called_scope = EG(current_execute_data)->called_scope; + if (EX(called_scope) && + instanceof_function(EX(called_scope), fci_cache.calling_scope TSRMLS_CC)) { + fci_cache.called_scope = EX(called_scope); } if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && Z_TYPE(retval) != IS_UNDEF) { |