1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-24 08:10:13 +02:00

[feature/twig] Prevent errors from empty user->style

PHPBB3-11598
This commit is contained in:
Nathaniel Guse 2013-07-01 14:42:05 -05:00
parent d7cff78443
commit 1a58d188aa

View File

@ -186,7 +186,7 @@ class phpbb_template_twig implements phpbb_template
$this->twig->getLoader()->setPaths($style_paths);
// Core style namespace from phpbb_style::set_style()
if ($this->user && ($style_names === array($this->user->style['style_path']) || $style_names[0] == $this->user->style['style_path']))
if (isset($this->user->style['style_path']) && ($style_names === array($this->user->style['style_path']) || $style_names[0] == $this->user->style['style_path']))
{
$this->twig->getLoader()->setPaths($style_paths, 'core');
}