Skip to content

Commit e46e575

Browse files
committed
Patch output cleaner
1 parent f405560 commit e46e575

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

Handlers/AbstractHandler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ protected function getTrace(throwable $exception): array
150150
*/
151151
protected function emitter(throwable $exception, ?ExceptionItem $exceptionItem = null): void
152152
{
153+
$this->cleanOutputBuffers();
154+
153155
$response = $this->getHttp()->response()->withoutHeader('location');
154156
$response->createHeaders();
155157
$response->executeHeaders();

Handlers/XmlHandler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public function exceptionHandler(Throwable $exception): void
3535

3636
$xmlTrace = $xml->addChild('trace');
3737
foreach($trace as $row) {
38-
$xmlTrace->addChild("file", $row['file']);
39-
$xmlTrace->addChild("line", $row['line']);
40-
$xmlTrace->addChild("class", $row['class']);
41-
$xmlTrace->addChild("function", $row['function']);
38+
$xmlTrace->addChild("file", ($row['file'] ?? ""));
39+
$xmlTrace->addChild("line", ($row['line'] ?? ""));
40+
$xmlTrace->addChild("class", ($row['class'] ?? ""));
41+
$xmlTrace->addChild("function", ($row['function'] ?? ""));
4242
}
4343
$this->getHttp()->response()->withHeader('content-type', 'application/xml; charset=utf-8');
4444
$this->getHttp()->response()->getBody()->write($xml->asXML());

main.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu,
2121
figure {
2222
margin: 0;
2323
}
24-
h1, h2, h3, h4, h5, h6, pre { font-size: 1.6rem; font-weight: normal; line-height: 1.27em; margin: 0; }
24+
h1, h2, h3, h4, h5, h6, .code-block pre { font-size: 1.6rem; font-weight: normal; line-height: 1.27em; margin: 0; }
2525

2626
code {
2727

@@ -32,7 +32,7 @@ code {
3232
-webkit-overflow-scrolling: touch;
3333
}
3434

35-
pre {
35+
.code-block pre {
3636
width: calc(100vw - 560px);
3737
font-size: 1.4rem;
3838
font-family: "Lucida Console", Monaco, monospace;
@@ -292,7 +292,7 @@ main > article {
292292
width: 340px;
293293
}
294294

295-
pre {
295+
.code-block pre {
296296
width: calc(100vw - 420px);
297297
}
298298

@@ -327,7 +327,7 @@ main > article {
327327
background-color: #009956;
328328
}
329329

330-
pre {
330+
.code-block pre {
331331
width: 100%;
332332
}
333333

0 commit comments

Comments
 (0)