Skip to content

Commit c6f15c6

Browse files
committed
hmmm
1 parent d02601f commit c6f15c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_API.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,8 @@ static zend_always_inline zend_result _object_and_properties_init(zval *arg, zen
18391839
}
18401840
}
18411841

1842-
if (check_class != scope && check_class->lexical_scope && check_class->lexical_scope->type != ZEND_NAMESPACE_CLASS) {
1842+
// preloading may have changed the class type from ZEND_NAMESPACE_CLASS, so we need to check for user/internal class
1843+
if (check_class != scope && check_class->lexical_scope && (check_class->lexical_scope->type != ZEND_USER_CLASS && check_class->lexical_scope->type != ZEND_INTERNAL_CLASS)) {
18431844
check_class = check_class->lexical_scope;
18441845
goto check_lexical_scope;
18451846
}

0 commit comments

Comments
 (0)