Skip to content

Commit 1bf0dd7

Browse files
committed
Adjust dfa pass
1 parent b7c322e commit 1bf0dd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/Optimizer/dfa_pass.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static inline bool can_elide_return_type_check(
317317
zend_string *lcname = zend_string_tolower(ZEND_TYPE_NAME(*single_type));
318318
zend_class_entry *ce = zend_optimizer_get_class_entry(script, lcname);
319319
zend_string_release(lcname);
320-
if (ce && safe_instanceof(use_info->ce, ce)) {
320+
if (ce && ZEND_TYPE_IS_UNION(arg_info->type) && safe_instanceof(use_info->ce, ce)) {
321321
/* One of the class union types matched. */
322322
return true;
323323
}

0 commit comments

Comments
 (0)