aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-10-05 16:22:21 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-10-05 16:22:21 +0000
commitd5fe2e7db7bf84add27feaa4ac429346c539636c (patch)
treeaedcb10bf57c5b9ce58263ba90f55fae37adcc64
parente9c1c03ca675d413057f5def6c8d1971517541ab (diff)
downloadforums-d5fe2e7db7bf84add27feaa4ac429346c539636c.tar
forums-d5fe2e7db7bf84add27feaa4ac429346c539636c.tar.gz
forums-d5fe2e7db7bf84add27feaa4ac429346c539636c.tar.bz2
forums-d5fe2e7db7bf84add27feaa4ac429346c539636c.tar.xz
forums-d5fe2e7db7bf84add27feaa4ac429346c539636c.zip
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
-rw-r--r--phpBB/includes/template.php7
1 files changed, 6 insertions, 1 deletions
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)