Skip to content

Commit 5a21c51

Browse files
Girgiasnikic
authored andcommitted
Address review
1 parent f152768 commit 5a21c51

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
@@ -1032,10 +1032,6 @@ static zend_always_inline bool zend_check_type_slow(
10321032
if (!ce) {
10331033
ce = zend_lookup_class_ex(name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD);
10341034
if (!ce) {
1035-
if (HAVE_CACHE_SLOT) {
1036-
cache_slot++;
1037-
}
1038-
10391035
/* Cannot resolve */
10401036
return false;
10411037
}
@@ -1044,18 +1040,15 @@ static zend_always_inline bool zend_check_type_slow(
10441040
ce = zend_fetch_class(name,
10451041
ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_SILENT);
10461042
if (!ce) {
1047-
if (HAVE_CACHE_SLOT) {
1048-
cache_slot++;
1049-
}
1050-
10511043
/* Cannot resolve */
10521044
return false;
10531045
}
10541046
}
10551047
}
10561048

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

0 commit comments

Comments
 (0)