diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-07-03 02:34:43 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-07-03 02:34:43 +0400 |
commit | c4d99ec982e214d05b398694dc76a9caac16fbd1 (patch) | |
tree | ec5c9a08f9100325b1f3811ff71ad8c84ccbc07a /Zend/zend_API.c | |
parent | 0a77dcd4b9046adb7c8f719ded19c5eff0c8976a (diff) | |
download | php-git-c4d99ec982e214d05b398694dc76a9caac16fbd1.tar.gz |
Removed EG(called_scope) and use corresponding value from EG(current_execute_data)
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 6474fd6ad7..faf18252e4 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2770,7 +2770,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache if (!EG(scope)) { if (error) *error = estrdup("cannot access self:: when no class scope is active"); } else { - fcc->called_scope = EG(called_scope); + fcc->called_scope = EG(current_execute_data) ? EG(current_execute_data)->called_scope : NULL; fcc->calling_scope = EG(scope); if (!fcc->object && Z_OBJ(EG(This))) { fcc->object = Z_OBJ(EG(This)); @@ -2784,7 +2784,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache } else if (!EG(scope)->parent) { if (error) *error = estrdup("cannot access parent:: when current class scope has no parent"); } else { - fcc->called_scope = EG(called_scope); + fcc->called_scope = EG(current_execute_data) ? EG(current_execute_data)->called_scope : NULL; fcc->calling_scope = EG(scope)->parent; if (!fcc->object && Z_OBJ(EG(This))) { fcc->object = Z_OBJ(EG(This)); @@ -2794,11 +2794,11 @@ static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache } } else if (name_len == sizeof("static") - 1 && !memcmp(lcname->val, "static", sizeof("static") - 1)) { - if (!EG(called_scope)) { + if (!EG(current_execute_data) || !EG(current_execute_data)->called_scope) { if (error) *error = estrdup("cannot access static:: when no class scope is active"); } else { - fcc->called_scope = EG(called_scope); - fcc->calling_scope = EG(called_scope); + fcc->called_scope = EG(current_execute_data)->called_scope; + fcc->calling_scope = EG(current_execute_data)->called_scope; if (!fcc->object && Z_OBJ(EG(This))) { fcc->object = Z_OBJ(EG(This)); } |