Skip to content

Commit

Permalink
! Special case for fatal error template so its output properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Spuds committed Dec 11, 2023
1 parent 724020c commit 6af71d4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions themes/default/Theme.php
Expand Up @@ -62,7 +62,11 @@ public function template_header()
if ($this->headerSent('Content-Type') === false)
{
// Probably temporary ($_REQUEST['xml'] should be replaced by $_REQUEST['api'])
if (isset($_REQUEST['api']) && $_REQUEST['api'] === 'json')
if (isset($context['sub_template']) && $context['sub_template'] === 'fatal_error')
{
header('Content-Type: text/html; charset=UTF-8');
}
elseif (isset($_REQUEST['api']) && $_REQUEST['api'] === 'json')
{
header('Content-Type: application/json; charset=UTF-8');
}
Expand Down Expand Up @@ -1248,7 +1252,7 @@ public function loadThemeVariant()
// Variant icon definitions?
if (file_exists($settings['theme_dir'] . '/css/' . $context['theme_variant'] . '/icons_svg' . $context['theme_variant'] . '.css'))
{
loadCSSFile($context['theme_variant'] . '/icons_svg' . $context['theme_variant'] . '.css');
loadCSSFile($context['theme_variant'] . '/icons_svg' . $context['theme_variant'] . '.css');
}

// Load a theme variant custom CSS
Expand Down

0 comments on commit 6af71d4

Please sign in to comment.