Skip to content

Commit 8f8df0f

Browse files
committed
Address review
1 parent e9d7fb6 commit 8f8df0f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

Zend/zend_execute.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,10 +1041,6 @@ static zend_always_inline bool zend_check_type_slow(
10411041
if (!ce) {
10421042
ce = zend_lookup_class_ex(name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD);
10431043
if (!ce) {
1044-
if (HAVE_CACHE_SLOT) {
1045-
cache_slot++;
1046-
}
1047-
10481044
/* Cannot resolve */
10491045
return false;
10501046
}
@@ -1053,18 +1049,15 @@ static zend_always_inline bool zend_check_type_slow(
10531049
ce = zend_fetch_class(name,
10541050
ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_SILENT);
10551051
if (!ce) {
1056-
if (HAVE_CACHE_SLOT) {
1057-
cache_slot++;
1058-
}
1059-
10601052
/* Cannot resolve */
10611053
return false;
10621054
}
10631055
}
10641056
}
10651057

10661058
/* Perform actual type check */
1067-
/* Instance of a single type part of a union is sufficient to pass the type check */
1059+
/* If type is not an instance of one of the types taking part in the
1060+
* intersection it cannot be a valid instance of the whole intersection type. */
10681061
if (!instanceof_function(Z_OBJCE_P(arg), ce)) {
10691062
return false;
10701063
}

0 commit comments

Comments
 (0)