From 4d08d769c2c146d0370d7e97b223b1c199412be1 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 1 Sep 2011 15:09:58 -0400 Subject: [PATCH] [feature/extension-manager] Fallback template might not always be set PHPBB3-10323 --- phpBB/includes/template/template.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/template/template.php b/phpBB/includes/template/template.php index 7b1ac79c9d..d46032f521 100644 --- a/phpBB/includes/template/template.php +++ b/phpBB/includes/template/template.php @@ -126,10 +126,14 @@ class phpbb_template */ public function set_custom_template($template_path, $template_name, $fallback_template_path = false, $fallback_template_name = false) { - $this->provider->set_templates(array( - $template_name => $template_path, - $fallback_template_name => $fallback_template_path, - )); + $templates = array($template_name => $template_path); + + if ($fallback_template_path !== false) + { + $templates[$fallback_template_name] = $fallback_template_path; + } + + $this->provider->set_templates($templates); $this->locator->set_paths($this->provider); $this->locator->set_main_template($this->provider->get_main_template_path());