Skip to content

Commit

Permalink
minor #18059 [WebProfilerBundle] fix context log pre wrap (HeahDude)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabpot committed Mar 10, 2016
2 parents 117d83b + 6b23861 commit 464a492
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Expand Up @@ -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 {
Expand Down
Expand Up @@ -58,7 +58,13 @@ public function exportValue($value, $depth = 1, $deep = false)
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)) {
Expand Down

0 comments on commit 464a492

Please sign in to comment.