@@ -403,7 +403,7 @@ static zend_always_inline uintptr_t zend_get_property_offset(zend_class_entry *c
403
403
goto dynamic ;
404
404
} else {
405
405
wrong :
406
- if (scope && scope -> lexical_scope ) {
406
+ if (scope && scope -> lexical_scope && scope -> lexical_scope -> type != ZEND_NAMESPACE_CLASS ) {
407
407
scope = scope -> lexical_scope ;
408
408
goto check_lexical_scope ;
409
409
}
@@ -1839,7 +1839,7 @@ ZEND_API zend_function *zend_std_get_method(zend_object **obj_ptr, zend_string *
1839
1839
if (zobj -> ce -> __call ) {
1840
1840
fbc = zend_get_user_call_function (zobj -> ce , method_name );
1841
1841
} else {
1842
- if (scope && scope -> lexical_scope ) {
1842
+ if (scope && scope -> lexical_scope && scope -> lexical_scope -> type != ZEND_NAMESPACE_CLASS ) {
1843
1843
scope = scope -> lexical_scope ;
1844
1844
goto check_lexical_scope ;
1845
1845
}
@@ -1909,7 +1909,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_st
1909
1909
|| UNEXPECTED (!zend_check_protected (zend_get_function_root_class (fbc ), scope ))) {
1910
1910
zend_function * fallback_fbc = get_static_method_fallback (ce , function_name );
1911
1911
if (!fallback_fbc ) {
1912
- if (scope && scope -> lexical_scope ) {
1912
+ if (scope && scope -> lexical_scope && scope -> lexical_scope -> type != ZEND_NAMESPACE_CLASS ) {
1913
1913
scope = scope -> lexical_scope ;
1914
1914
goto check_lexical_scope ;
1915
1915
}
@@ -1996,7 +1996,7 @@ ZEND_API zval *zend_std_get_static_property_with_info(zend_class_entry *ce, zend
1996
1996
if (UNEXPECTED (property_info -> flags & ZEND_ACC_PRIVATE )
1997
1997
|| UNEXPECTED (!is_protected_compatible_scope (property_info -> ce , scope ))) {
1998
1998
if (type != BP_VAR_IS ) {
1999
- if (scope && scope -> lexical_scope ) {
1999
+ if (scope && scope -> lexical_scope && scope -> lexical_scope -> type != ZEND_NAMESPACE_CLASS ) {
2000
2000
scope = scope -> lexical_scope ;
2001
2001
goto check_lexical_scope ;
2002
2002
}
@@ -2084,7 +2084,7 @@ ZEND_API zend_function *zend_std_get_constructor(zend_object *zobj) /* {{{ */
2084
2084
if (UNEXPECTED (constructor -> common .scope != scope )) {
2085
2085
if (UNEXPECTED (constructor -> op_array .fn_flags & ZEND_ACC_PRIVATE )
2086
2086
|| UNEXPECTED (!zend_check_protected (zend_get_function_root_class (constructor ), scope ))) {
2087
- if (scope && scope -> lexical_scope ) {
2087
+ if (scope && scope -> lexical_scope && scope -> lexical_scope -> type != ZEND_NAMESPACE_CLASS ) {
2088
2088
scope = scope -> lexical_scope ;
2089
2089
goto check_lexical_scope ;
2090
2090
}
0 commit comments