Skip to content

Commit 6d4d266

Browse files
authored
Merge pull request #1468 from Parship12/fix/php-flatten-name-collision
fix: use array_merge in flatten() to handle duplicate keys correctly
2 parents 9cf1509 + ef67be9 commit 6d4d266

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

templates/php/src/Client.php.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class Client
354354
$finalKey = $prefix ? "{$prefix}[{$key}]" : $key;
355355
356356
if (is_array($value)) {
357-
$output += $this->flatten($value, $finalKey); // @todo: handle name collision here if needed
357+
$output = array_merge($output, $this->flatten($value, $finalKey));
358358
}
359359
else {
360360
$output[$finalKey] = $value;

0 commit comments

Comments
 (0)