Skip to content

Commit 0ab1f9f

Browse files
authored
zend_execute: Remove unused scope parameter from zend_check_type() (#20937)
1 parent ff5cecd commit 0ab1f9f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Zend/zend_execute.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,8 +1213,7 @@ static zend_always_inline bool zend_check_type_slow(
12131213
}
12141214

12151215
static zend_always_inline bool zend_check_type(
1216-
const zend_type *type, zval *arg, zend_class_entry *scope,
1217-
bool is_return_type, bool is_internal)
1216+
const zend_type *type, zval *arg, bool is_return_type, bool is_internal)
12181217
{
12191218
const zend_reference *ref = NULL;
12201219
ZEND_ASSERT(ZEND_TYPE_IS_SET(*type));
@@ -1246,7 +1245,7 @@ static zend_always_inline bool zend_verify_recv_arg_type(const zend_function *zf
12461245
cur_arg_info = &zf->common.arg_info[arg_num-1];
12471246

12481247
if (ZEND_TYPE_IS_SET(cur_arg_info->type)
1249-
&& UNEXPECTED(!zend_check_type(&cur_arg_info->type, arg, zf->common.scope, false, false))) {
1248+
&& UNEXPECTED(!zend_check_type(&cur_arg_info->type, arg, false, false))) {
12501249
zend_verify_arg_error(zf, cur_arg_info, arg_num, arg);
12511250
return 0;
12521251
}
@@ -1258,7 +1257,7 @@ static zend_always_inline bool zend_verify_variadic_arg_type(
12581257
const zend_function *zf, const zend_arg_info *arg_info, uint32_t arg_num, zval *arg)
12591258
{
12601259
ZEND_ASSERT(ZEND_TYPE_IS_SET(arg_info->type));
1261-
if (UNEXPECTED(!zend_check_type(&arg_info->type, arg, zf->common.scope, false, false))) {
1260+
if (UNEXPECTED(!zend_check_type(&arg_info->type, arg, false, false))) {
12621261
zend_verify_arg_error(zf, arg_info, arg_num, arg);
12631262
return 0;
12641263
}
@@ -1283,7 +1282,7 @@ static zend_never_inline ZEND_ATTRIBUTE_UNUSED bool zend_verify_internal_arg_typ
12831282
}
12841283

12851284
if (ZEND_TYPE_IS_SET(cur_arg_info->type)
1286-
&& UNEXPECTED(!zend_check_type(&cur_arg_info->type, arg, fbc->common.scope, false, /* is_internal */ true))) {
1285+
&& UNEXPECTED(!zend_check_type(&cur_arg_info->type, arg, false, /* is_internal */ true))) {
12871286
return 0;
12881287
}
12891288
arg++;
@@ -1489,7 +1488,7 @@ ZEND_API bool zend_verify_internal_return_type(const zend_function *zf, zval *re
14891488
return 1;
14901489
}
14911490

1492-
if (UNEXPECTED(!zend_check_type(&ret_info->type, ret, NULL, true, /* is_internal */ true))) {
1491+
if (UNEXPECTED(!zend_check_type(&ret_info->type, ret, true, /* is_internal */ true))) {
14931492
zend_verify_internal_return_error(zf, ret);
14941493
return 0;
14951494
}

0 commit comments

Comments
 (0)