aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-07 14:35:42 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-18 17:30:31 +0100
commit97bbf2d2b8b5b7689432ad8a35e96c38fd869dd7 (patch)
tree049ee7dc0e79fb7d1b9c55ee07b8e5c4478921a9
parent99ace63e62fddc934eded20afc6a7aebbc05e13b (diff)
downloadforums-97bbf2d2b8b5b7689432ad8a35e96c38fd869dd7.tar
forums-97bbf2d2b8b5b7689432ad8a35e96c38fd869dd7.tar.gz
forums-97bbf2d2b8b5b7689432ad8a35e96c38fd869dd7.tar.bz2
forums-97bbf2d2b8b5b7689432ad8a35e96c38fd869dd7.tar.xz
forums-97bbf2d2b8b5b7689432ad8a35e96c38fd869dd7.zip
[ticket/14457] Handle the case where there isn't any 'definition' bag
PHPBB3-14457
-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);