Update debug check to look in $_SERVER and getenv in 500 error page
This commit is contained in:
@@ -11,7 +11,10 @@
|
||||
<span style="font-size: 5rem; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-family: 'Outfit';">500</span>
|
||||
<h1 style="font-size: 1.8rem; font-weight: 700;">System Server Error</h1>
|
||||
<p style="color: var(--text-muted); font-size: 1rem; line-height: 1.6;"><?= isset($message) ? $this->escape($message) : 'A critical exception has occurred on the application server.' ?></p>
|
||||
<?php if (filter_var($_ENV['APP_DEBUG'] ?? false, FILTER_VALIDATE_BOOLEAN) && isset($exception)): ?>
|
||||
<?php
|
||||
$isDebug = filter_var($_ENV['APP_DEBUG'] ?? $_SERVER['APP_DEBUG'] ?? getenv('APP_DEBUG') ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
if ($isDebug && isset($exception)):
|
||||
?>
|
||||
<pre style="text-align: left; background: rgba(0,0,0,0.5); padding: 15px; border-radius: 8px; overflow-x: auto; font-family: monospace; font-size: 0.85rem; color: #ff6b6b; max-height: 250px; margin-top: 15px;">
|
||||
<?= $this->escape($exception->getMessage()) ?>
|
||||
in <?= $this->escape($exception->getFile()) ?>:<?= $exception->getLine() ?>
|
||||
|
||||
Reference in New Issue
Block a user