Skip to content

Commit

Permalink
Fix "array to string conversion" in 3.5.0 (#1102)
Browse files Browse the repository at this point in the history
This commit broke the debugbar: 51c8ea3#diff-8a2d53e88e43b04de0cc4f64882d91feR63 since sprintf() uses multiple arguments, it doesn't accept an array of arguments.
  • Loading branch information
LukeTowers authored Sep 7, 2020
1 parent 1180dca commit 233c106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DataFormatter/SimpleFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private function exportValue($value, $depth = 1, $deep = false)

if ($deep) {
$args = [$indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1)];
return sprintf("[\n%s%s\n%s]", $args);
return sprintf("[\n%s%s\n%s]", ...$args);
}

$s = sprintf('[%s]', implode(', ', $a));
Expand Down

1 comment on commit 233c106

@shoemoney
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!!

Please sign in to comment.