From edc5061f1df0fd3ce6f307b91f309a52e037cf73 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 20 Aug 2009 14:53:25 +0000 Subject: [PATCH] Check for valid $template_path in includes/template.php - Bug #50055 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10036 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/template.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index fece30e4cd..80434aca4c 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -94,6 +94,12 @@ class template { global $phpbb_root_path, $user; + // Make sure $template_path has no ending slash + if (substr($template_path, -1) == '/') + { + $template_path = substr($template_path, 0, -1); + } + $this->root = $template_path; $this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_'; $user->theme['template_storedb'] = false;