From: Meik S. <acy...@ph...> - 2009-10-05 16:22:38
|
Author: acydburn Date: Mon Oct 5 17:22:21 2009 New Revision: 10213 Log: bugfix for non-existent handles and theme data (we really need to clean this up, template_files feels quite furry) Modified: branches/phpBB-3_0_0/phpBB/includes/template.php Modified: branches/phpBB-3_0_0/phpBB/includes/template.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/template.php (original) --- branches/phpBB-3_0_0/phpBB/includes/template.php Mon Oct 5 17:22:21 2009 *************** *** 248,255 **** { global $user, $phpEx, $config; $filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx; ! $this->files_template[$handle] = $user->theme['template_id']; $recompile = false; if (!file_exists($filename) || @filesize($filename) === 0) --- 248,260 ---- { 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] = (isset($user->theme['template_id'])) ? $user->theme['template_id'] : 0; $recompile = false; if (!file_exists($filename) || @filesize($filename) === 0) |