aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/phpbb/template/twig/environment.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php
index 65f1af5d9e..56c85c8d71 100644
--- a/phpBB/phpbb/template/twig/environment.php
+++ b/phpBB/phpbb/template/twig/environment.php
@@ -213,8 +213,11 @@ class environment extends \Twig_Environment
{
$placeholder_salt = unique_id();
- $context['definition']->set('SCRIPTS', '__SCRIPTS_' . $placeholder_salt . '__');
- $context['definition']->set('STYLESHEETS', '__STYLESHEETS_' . $placeholder_salt . '__');
+ if (array_key_exists('definition', $context))
+ {
+ $context['definition']->set('SCRIPTS', '__SCRIPTS_' . $placeholder_salt . '__');
+ $context['definition']->set('STYLESHEETS', '__STYLESHEETS_' . $placeholder_salt . '__');
+ }
$output = parent::render($name, $context);