10000 [HttpKernel] fix ValueExporter for long inline arrays · symfony/symfony@209c819 · GitHub
[go: up one dir, main page]

Skip to content

Commit 209c819

Browse files
committed
[HttpKernel] fix ValueExporter for long inline arrays
1 parent c6e6e75 commit 209c819

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ public function exportValue($value, $depth = 1, $deep = false)
5858
return sprintf("[\n%s%s\n%s]", $indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1));
5959
}
6060

61-
return sprintf('[%s]', implode(', ', $a));
61+
$s = sprintf('[%s]', implode(', ', $a));
62+
63+
if (120 > strlen($s)) {
64+
return $s;
65+
}
66+
67+
return sprintf("[\n%s%s\n]", $indent, implode(sprintf(",\n%s", $indent), $a));
6268
}
6369

6470
if (is_resource($value)) {

0 commit comments

Comments
 (0)
0