[HttpKernel] fixed indentation of generated HTML in ExceptionHandler
This commit is contained in:
parent
8d79ebc8ce
commit
53b3c8304f
@ -107,9 +107,17 @@ class ExceptionHandler
|
|||||||
$total = $count + 1;
|
$total = $count + 1;
|
||||||
$class = $this->abbrClass($e['class']);
|
$class = $this->abbrClass($e['class']);
|
||||||
$message = nl2br($e['message']);
|
$message = nl2br($e['message']);
|
||||||
$content .= "<div class=\"block_exception clear_fix\"><h2><span>$ind/$total</span> $class: $message</h2></div><div class=\"block\"><ol class=\"traces list_exception\">";
|
$content .= sprintf(<<<EOF
|
||||||
|
<div class="block_exception clear_fix">
|
||||||
|
<h2><span>%d/%d</span> %s: %s</h2>
|
||||||
|
</div>
|
||||||
|
<div class="block">
|
||||||
|
<ol class="traces list_exception">
|
||||||
|
|
||||||
|
EOF
|
||||||
|
, $ind, $total, $class, $message);
|
||||||
foreach ($e['trace'] as $i => $trace) {
|
foreach ($e['trace'] as $i => $trace) {
|
||||||
$content .= '<li>';
|
$content .= ' <li>';
|
||||||
if ($trace['function']) {
|
if ($trace['function']) {
|
||||||
$content .= sprintf('at %s%s%s()', $this->abbrClass($trace['class']), $trace['type'], $trace['function']);
|
$content .= sprintf('at %s%s%s()', $this->abbrClass($trace['class']), $trace['type'], $trace['function']);
|
||||||
}
|
}
|
||||||
@ -121,10 +129,10 @@ class ExceptionHandler
|
|||||||
$content .= sprintf(' in %s line %s', $trace['file'], $trace['line']);
|
$content .= sprintf(' in %s line %s', $trace['file'], $trace['line']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$content .= '</li>';
|
$content .= "</li>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= '</ol></div>';
|
$content .= " </ol>\n</div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
@ -199,7 +207,7 @@ class ExceptionHandler
|
|||||||
<body>
|
<body>
|
||||||
<div id="content" class="sf-exceptionreset">
|
<div id="content" class="sf-exceptionreset">
|
||||||
<h1>$title</h1>
|
<h1>$title</h1>
|
||||||
$content
|
$content
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user