Skip to content

Commit 1f7054a

Browse files
committed
Fix arg name
1 parent dce2e78 commit 1f7054a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Zend/tests/partial_application/references_004.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ Closure [ <user> static function {closure:%s:%d} ] {
2828

2929
- Bound Variables [2] {
3030
Variable #0 [ $a ]
31-
Variable #1 [ $args0 ]
31+
Variable #1 [ $args1 ]
3232
}
3333

3434
- Parameters [2] {
35-
Parameter #0 [ <required> &$args1 ]
35+
Parameter #0 [ <required> &$args0 ]
3636
Parameter #1 [ <optional> &...$args ]
3737
}
3838
}

Zend/zend_partial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static void zp_assign_names(zend_string **names, uint32_t num_names,
169169
}
170170
zend_string *orig_name = zp_get_param_name(function, function->common.num_args);
171171
zend_string *new_name;
172-
for (uint32_t n = offset - function->common.num_args;; n++) {
172+
for (uint32_t n = 0;; n++) {
173173
new_name = zend_strpprintf_unchecked(0, "%S%" PRIu32, orig_name, n);
174174
if (!zp_name_exists(names, num_names, new_name)) {
175175
break;

0 commit comments

Comments
 (0)