Skip to content

Commit

Permalink
Fix preloading property type resolution
Browse files Browse the repository at this point in the history
This was causing many failures under --preload...
  • Loading branch information
nikic committed Jul 14, 2020
1 parent e5cb53e commit 0616219
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -3672,12 +3672,15 @@ static zend_bool preload_try_resolve_property_types(zend_class_entry *ce)
ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) {
zend_type *single_type;
ZEND_TYPE_FOREACH(prop->type, single_type) {
zend_class_entry *p = preload_fetch_resolved_ce(ZEND_TYPE_NAME(*single_type), ce);
if (!p) {
ok = 0;
continue;
if (ZEND_TYPE_HAS_NAME(*single_type)) {
zend_class_entry *p =
preload_fetch_resolved_ce(ZEND_TYPE_NAME(*single_type), ce);
if (!p) {
ok = 0;
continue;
}
ZEND_TYPE_SET_CE(*single_type, p);
}
ZEND_TYPE_SET_CE(*single_type, p);
} ZEND_TYPE_FOREACH_END();
} ZEND_HASH_FOREACH_END();
}
Expand Down

0 comments on commit 0616219

Please sign in to comment.