fix non-capturing catch for PHP 7.4 support

This commit is contained in:
Art4 2024-12-07 07:11:28 +00:00
parent b55dc0ac48
commit f36e118609

View file

@ -88,7 +88,7 @@ class HTTPException
try { try {
$tpl = Renderer::getMarkupTemplate('http_status.tpl'); $tpl = Renderer::getMarkupTemplate('http_status.tpl');
$content = Renderer::replaceMacros($tpl, $vars); $content = Renderer::replaceMacros($tpl, $vars);
} catch (Throwable) { } catch (Throwable $th) {
$vars = array_map('htmlentities', $vars); $vars = array_map('htmlentities', $vars);
$content = "<h1>{$vars['$title']}</h1><p>{$vars['$message']}</p>"; $content = "<h1>{$vars['$title']}</h1><p>{$vars['$message']}</p>";
if ($this->isSiteAdmin) { if ($this->isSiteAdmin) {