Skip to content

Commit 558400a

Browse files
committed
minor #18059 [WebProfilerBundle] fix context log pre wrap (HeahDude)
This PR was squashed before being merged into the 3.1-dev branch (closes #18059). Discussion ---------- [WebProfilerBundle] fix context log pre wrap | Q | A | ------------- | --- | Branch | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | - Commits ------- 6b23861 [WebProfilerBundle] fix context log pre wrap
2 parents 7997985 + e612b87 commit 558400a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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 (80 > 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)