From 8cbc283cd99b63ac0ffac2b2ce94c4efed9f1f4a Mon Sep 17 00:00:00 2001 From: John Rayes Date: Tue, 8 Oct 2024 22:34:20 -0700 Subject: [PATCH] Pri nt the actual theme error instead of a placeholder --- Sources/Theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Theme.php b/Sources/Theme.php index f8ae4bff29..4e38a1ea13 100644 --- a/Sources/Theme.php +++ b/Sources/Theme.php @@ -380,7 +380,7 @@ public static function loadTemplate(string|bool $template_name, array|string $st } // Cause an error otherwise. elseif ($template_name != 'Errors' && $template_name != 'index' && $fatal) { - ErrorHandler::fatalLang('theme_template_error', 'template', [(string) $template_name]); + ErrorHandler::fatalLang('theme_template_error', 'template', ['template_name' => (string) $template_name, 'type' => 'file']); } elseif ($fatal) { die(ErrorHandler::log(Lang::formatText(Lang::$txt['theme_template_error'] ?? 'Unable to load the {template_name} template file.', ['template_name' => (string) $template_name, 'type' => 'file']), 'template')); } else { @@ -416,7 +416,7 @@ public static function loadSubTemplate(string $sub_template_name, bool|string $f if (function_exists($theme_function)) { $theme_function(); } elseif ($fatal === false) { - ErrorHandler::fatalLang('theme_template_error', 'template', [(string) $sub_template_name]); + ErrorHandler::fatalLang('theme_template_error', 'template', ['template_name' => (string) $sub_template_name, 'type' => 'sub']); } elseif ($fatal !== 'ignore') { die(ErrorHandler::log(Lang::formatText(Lang::$txt['theme_template_error'] ?? 'Unable to load the {template_name} sub-template.', ['template_name' => (string) $sub_template_name, 'type' => 'sub']), 'template')); }