Skip to content

Commit 8b35867

Browse files
committed
test
1 parent 380a03b commit 8b35867

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Zend/zend_execute.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,9 +1145,9 @@ static zend_always_inline bool zend_check_type_slow(
11451145
bool is_return_type, bool is_internal)
11461146
{
11471147
if (ZEND_TYPE_IS_COMPLEX(*type) && EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) {
1148-
if (*cache_slot == Z_OBJCE_P(arg)) {
1149-
return true;
1150-
}
1148+
// if (*cache_slot == Z_OBJCE_P(arg)) {
1149+
// return true;
1150+
// }
11511151
zend_class_entry *ce;
11521152
if (UNEXPECTED(ZEND_TYPE_HAS_LIST(*type))) {
11531153
if (ZEND_TYPE_IS_INTERSECTION(*type)) {
@@ -1242,6 +1242,10 @@ static zend_always_inline bool zend_verify_recv_arg_type(const zend_function *zf
12421242
ZEND_ASSERT(arg_num <= zf->common.num_args);
12431243
cur_arg_info = &zf->common.arg_info[arg_num-1];
12441244

1245+
if (Z_TYPE_P(arg) == IS_OBJECT && *cache_slot == Z_OBJCE_P(arg)) {
1246+
return 1;
1247+
}
1248+
12451249
if (ZEND_TYPE_IS_SET(cur_arg_info->type)
12461250
&& UNEXPECTED(!zend_check_type(&cur_arg_info->type, arg, cache_slot, zf->common.scope, 0, 0))) {
12471251
zend_verify_arg_error(zf, cur_arg_info, arg_num, arg);

0 commit comments

Comments
 (0)