We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7c322e commit 1bf0dd7Copy full SHA for 1bf0dd7
Zend/Optimizer/dfa_pass.c
@@ -317,7 +317,7 @@ static inline bool can_elide_return_type_check(
317
zend_string *lcname = zend_string_tolower(ZEND_TYPE_NAME(*single_type));
318
zend_class_entry *ce = zend_optimizer_get_class_entry(script, lcname);
319
zend_string_release(lcname);
320
- if (ce && safe_instanceof(use_info->ce, ce)) {
+ if (ce && ZEND_TYPE_IS_UNION(arg_info->type) && safe_instanceof(use_info->ce, ce)) {
321
/* One of the class union types matched. */
322
return true;
323
}
0 commit comments