Skip to content

Commit 3fe181d

Browse files
committed
Fix merge
1 parent 5ebb678 commit 3fe181d

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

Zend/zend_inheritance.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -342,22 +342,16 @@ static zend_bool zend_type_permits_self(
342342
/* Any types that may satisfy self must have already been loaded at this point
343343
* (as a parent or interface), so we never need to register delayed variance obligations
344344
* for this case. */
345-
if (ZEND_TYPE_HAS_LIST(type)) {
346-
void *entry;
347-
ZEND_TYPE_LIST_FOREACH(ZEND_TYPE_LIST(type), entry) {
348-
zend_string *name = resolve_class_name(scope, ZEND_TYPE_LIST_GET_NAME(entry));
345+
zend_type *single_type;
346+
ZEND_TYPE_FOREACH(type, single_type) {
347+
if (ZEND_TYPE_HAS_NAME(*single_type)) {
348+
zend_string *name = resolve_class_name(scope, ZEND_TYPE_NAME(*single_type));
349349
zend_class_entry *ce = lookup_class(self, name, /* register_unresolved */ 0);
350350
if (ce && unlinked_instanceof(self, ce)) {
351351
return 1;
352352
}
353-
} ZEND_TYPE_LIST_FOREACH_END();
354-
return 0;
355-
}
356-
if (ZEND_TYPE_HAS_NAME(type)) {
357-
zend_string *name = resolve_class_name(scope, ZEND_TYPE_NAME(type));
358-
zend_class_entry *ce = lookup_class(self, name, /* register_unresolved */ 0);
359-
return ce && unlinked_instanceof(self, ce);
360-
}
353+
}
354+
} ZEND_TYPE_FOREACH_END();
361355
return 0;
362356
}
363357

ext/opcache/jit/zend_jit_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ static zend_always_inline zend_bool zend_jit_verify_type_common(zval *arg, const
11911191
return 1;
11921192
}
11931193
if ((type_mask & MAY_BE_STATIC) && zend_value_instanceof_static(arg)) {
1194-
return;
1194+
return 1;
11951195
}
11961196
if (zend_verify_scalar_type_hint(type_mask, arg, ZEND_ARG_USES_STRICT_TYPES(), /* is_internal */ 0)) {
11971197
return 1;

0 commit comments

Comments
 (0)