From d5fe2e7db7bf84add27feaa4ac429346c539636c Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 5 Oct 2009 16:22:21 +0000 Subject: [PATCH] bugfix for non-existent handles and theme data (we really need to clean this up, template_files feels quite furry) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10213 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/template.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 648af61c00..7d09694e2a 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -248,8 +248,13 @@ class template { global $user, $phpEx, $config; + if (!isset($this->filename[$handle])) + { + trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR); + } + $filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx; - $this->files_template[$handle] = $user->theme['template_id']; + $this->files_template[$handle] = (isset($user->theme['template_id'])) ? $user->theme['template_id'] : 0; $recompile = false; if (!file_exists($filename) || @filesize($filename) === 0)