Skip to content

Commit 7c4f70c

Browse files
committed
Address review
1 parent 05723db commit 7c4f70c

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
@@ -1030,10 +1030,6 @@ static zend_always_inline bool zend_check_type_slow(
10301030
if (!ce) {
10311031
ce = zend_lookup_class_ex(name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD);
10321032
if (!ce) {
1033-
if (HAVE_CACHE_SLOT) {
1034-
cache_slot++;
1035-
}
1036-
10371033
/* Cannot resolve */
10381034
return false;
10391035
}
@@ -1042,18 +1038,15 @@ static zend_always_inline bool zend_check_type_slow(
10421038
ce = zend_fetch_class(name,
10431039
ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_SILENT);
10441040
if (!ce) {
1045-
if (HAVE_CACHE_SLOT) {
1046-
cache_slot++;
1047-
}
1048-
10491041
/* Cannot resolve */
10501042
return false;
10511043
}
10521044
}
10531045
}
10541046

10551047
/* Perform actual type check */
1056-
/* Instance of a single type part of a union is sufficient to pass the type check */
1048+
/* If type is not an instance of one of the types taking part in the
1049+
* intersection it cannot be a valid instance of the whole intersection type. */
10571050
if (!instanceof_function(Z_OBJCE_P(arg), ce)) {
10581051
return false;
10591052
}

0 commit comments

Comments
 (0)