mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Don't handle unnamed arg in closure debug info
Since PHP 8, we should no longer have any unnamed arguments. Don't check for this case.
This commit is contained in:
parent
232aa34b9f
commit
ab353a50e9
1 changed files with 8 additions and 13 deletions
|
@ -561,7 +561,7 @@ static HashTable *zend_closure_get_debug_info(zend_object *object, int *is_temp)
|
||||||
for (i = 0; i < num_args; i++) {
|
for (i = 0; i < num_args; i++) {
|
||||||
zend_string *name;
|
zend_string *name;
|
||||||
zval info;
|
zval info;
|
||||||
if (arg_info->name) {
|
ZEND_ASSERT(arg_info->name && "Argument should have name");
|
||||||
if (zstr_args) {
|
if (zstr_args) {
|
||||||
name = zend_strpprintf(0, "%s$%s",
|
name = zend_strpprintf(0, "%s$%s",
|
||||||
ZEND_ARG_SEND_MODE(arg_info) ? "&" : "",
|
ZEND_ARG_SEND_MODE(arg_info) ? "&" : "",
|
||||||
|
@ -571,11 +571,6 @@ static HashTable *zend_closure_get_debug_info(zend_object *object, int *is_temp)
|
||||||
ZEND_ARG_SEND_MODE(arg_info) ? "&" : "",
|
ZEND_ARG_SEND_MODE(arg_info) ? "&" : "",
|
||||||
((zend_internal_arg_info*)arg_info)->name);
|
((zend_internal_arg_info*)arg_info)->name);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
name = zend_strpprintf(0, "%s$param%d",
|
|
||||||
ZEND_ARG_SEND_MODE(arg_info) ? "&" : "",
|
|
||||||
i + 1);
|
|
||||||
}
|
|
||||||
ZVAL_NEW_STR(&info, zend_strpprintf(0, "%s", i >= required ? "<optional>" : "<required>"));
|
ZVAL_NEW_STR(&info, zend_strpprintf(0, "%s", i >= required ? "<optional>" : "<required>"));
|
||||||
zend_hash_update(Z_ARRVAL(val), name, &info);
|
zend_hash_update(Z_ARRVAL(val), name, &info);
|
||||||
zend_string_release_ex(name, 0);
|
zend_string_release_ex(name, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue