mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/14457] Handle the case where there isn't any 'definition' bag
PHPBB3-14457
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user