Skip to content

Commit 0def0c9

Browse files
committed
Simplify zend_verify_never_error
1 parent 1b68ae6 commit 0def0c9

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

Zend/zend_execute.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,18 +1250,10 @@ ZEND_API ZEND_COLD void zend_verify_return_error(const zend_function *zf, zval *
12501250

12511251
ZEND_API ZEND_COLD void zend_verify_never_error(const zend_function *zf)
12521252
{
1253-
const zend_arg_info *arg_info = &zf->common.arg_info[-1];
1254-
const char *fname, *fsep, *fclass;
1255-
zend_string *need_msg;
1256-
const char *given_msg;
1253+
zend_string *func_name = get_function_or_method_name(zf);
12571254

1258-
zend_verify_type_error_common(
1259-
zf, arg_info, NULL, &fname, &fsep, &fclass, &need_msg, &given_msg);
1260-
1261-
zend_type_error("%s%s%s(): never-returning function must not implicitly return",
1262-
fclass, fsep, fname);
1263-
1264-
zend_string_release(need_msg);
1255+
zend_type_error("%s(): never-returning function must not implicitly return",
1256+
ZSTR_VAL(func_name));
12651257
}
12661258

12671259
#if ZEND_DEBUG

0 commit comments

Comments
 (0)