diff options
Diffstat (limited to 'Zend/zend_constants.c')
| -rw-r--r-- | Zend/zend_constants.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 4930d1fdd4..650a566159 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -231,7 +231,7 @@ static zend_constant *zend_get_special_constant(const char *name, uint name_len zend_constant *c; static char haltoff[] = "__COMPILER_HALT_OFFSET__"; - if (!EG(in_execution)) { + if (!EG(current_execute_data)) { return NULL; } else if (name_len == sizeof("__CLASS__")-1 && !memcmp(name, "__CLASS__", sizeof("__CLASS__")-1)) { @@ -354,7 +354,7 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, lcname = do_alloca(class_name_len + 1, use_heap); zend_str_tolower_copy(lcname, name, class_name_len); if (!scope) { - if (EG(in_execution)) { + if (EG(current_execute_data)) { scope = EG(scope); } else { scope = CG(active_class_entry); @@ -379,8 +379,8 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, } } else if (class_name_len == sizeof("static")-1 && !memcmp(lcname, "static", sizeof("static")-1)) { - if (EG(called_scope)) { - ce = EG(called_scope); + if (EG(current_execute_data) && EG(current_execute_data)->called_scope) { + ce = EG(current_execute_data)->called_scope; } else { zend_error(E_ERROR, "Cannot access static:: when no class scope is active"); } |
