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
This commit is contained in:
Fabien Potencier 2016-03-10 18:07:32 +01:00
commit 464a4920de
2 changed files with 8 additions and 1 deletions

View File

@ -827,6 +827,7 @@ table.logs .metadata .context {
table.logs .metadata .context pre {
margin: 5px 0;
padding: 5px 10px;
white-space: pre-wrap;
}
table.logs .sf-call-stack {

View File

@ -58,7 +58,13 @@ class ValueExporter
return sprintf("[\n%s%s\n%s]", $indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1));
}
return sprintf('[%s]', implode(', ', $a));
$s = sprintf('[%s]', implode(', ', $a));
if (80 > strlen($s)) {
return $s;
}
return sprintf("[\n%s%s\n]", $indent, implode(sprintf(",\n%s", $indent), $a));
}
if (is_resource($value)) {