Skip to content

Commit 0616219

Browse files
committed
Fix preloading property type resolution
This was causing many failures under --preload...
1 parent e5cb53e commit 0616219

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3672,12 +3672,15 @@ static zend_bool preload_try_resolve_property_types(zend_class_entry *ce)
36723672
ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) {
36733673
zend_type *single_type;
36743674
ZEND_TYPE_FOREACH(prop->type, single_type) {
3675-
zend_class_entry *p = preload_fetch_resolved_ce(ZEND_TYPE_NAME(*single_type), ce);
3676-
if (!p) {
3677-
ok = 0;
3678-
continue;
3675+
if (ZEND_TYPE_HAS_NAME(*single_type)) {
3676+
zend_class_entry *p =
3677+
preload_fetch_resolved_ce(ZEND_TYPE_NAME(*single_type), ce);
3678+
if (!p) {
3679+
ok = 0;
3680+
continue;
3681+
}
3682+
ZEND_TYPE_SET_CE(*single_type, p);
36793683
}
3680-
ZEND_TYPE_SET_CE(*single_type, p);
36813684
} ZEND_TYPE_FOREACH_END();
36823685
} ZEND_HASH_FOREACH_END();
36833686
}

0 commit comments

Comments
 (0)