Skip to content

Commit e630682

Browse files
committed
handle void
1 parent c2d9948 commit e630682

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_execute.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ static bool zend_check_type_slow(
11711171
}
11721172
}
11731173

1174-
if (ZEND_TYPE_IS_COMPLEX(type_tree->simple_type) && EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) {
1174+
if (type_tree != NULL && ZEND_TYPE_IS_COMPLEX(type_tree->simple_type) && EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) {
11751175
const zend_class_entry *ce = zend_fetch_ce_from_cache_slot(cache_slot, &type_tree->simple_type);
11761176
/* If we have a CE we check if it satisfies the type constraint,
11771177
* otherwise it will check if a standard type satisfies it. */
@@ -1181,7 +1181,7 @@ static bool zend_check_type_slow(
11811181
PROGRESS_CACHE_SLOT();
11821182
}
11831183

1184-
const uint32_t type_mask = ZEND_TYPE_FULL_MASK(type_tree->simple_type);
1184+
const uint32_t type_mask = ZEND_TYPE_FULL_MASK(*type);
11851185
if ((type_mask & MAY_BE_CALLABLE) &&
11861186
zend_is_callable(arg, is_internal ? IS_CALLABLE_SUPPRESS_DEPRECATIONS : 0, NULL)) {
11871187
return 1;

0 commit comments

Comments
 (0)