Skip to content

Commit b37eed5

Browse files
committed
Hide styles if show log is disabled
1 parent 0a010d2 commit b37eed5

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/Views/exceptions/production.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
*/
1111
$lang = static function (string $line) use ($handler) : string {
1212
return $handler->getLanguage()->render('debug', $line);
13-
}
13+
};
14+
15+
$log = $handler->getLog();
1416
?>
1517
<!doctype html>
1618
<html lang="<?= $handler->getLanguage()->getCurrentLocale() ?>" dir="<?= $handler->getLanguage()
@@ -35,22 +37,21 @@
3537
color: #fff;
3638
}
3739

40+
<?php if ($log) : ?>
3841
.log-id {
3942
background: #222;
4043
border-radius: 4px;
4144
cursor: copy;
4245
padding: 5px 10px;
4346
}
47+
48+
<?php endif ?>
4449
</style>
4550
</head>
4651
<body>
4752
<h1><?= $lang('exceptionTitle') ?></h1>
4853
<p><?= $lang('exceptionDescription') ?></p>
49-
50-
<?php
51-
$log = $handler->getLog();
52-
if ($log):
53-
?>
54+
<?php if ($log) : ?>
5455
<p><?= $lang('logId') ?>: <span class="log-id"
5556
title="<?= $lang('clickToCopyLogId') ?>"
5657
><?= htmlentities($log->id) ?></span>
@@ -61,9 +62,6 @@
6162
alert("<?= $lang('logIdCopied') ?>");
6263
}
6364
</script>
64-
<?php
65-
endif;
66-
?>
67-
65+
<?php endif ?>
6866
</body>
6967
</html>

0 commit comments

Comments
 (0)