aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template/twig/node/php.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/template/twig/node/php.php')
-rw-r--r--phpBB/includes/template/twig/node/php.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/template/twig/node/php.php b/phpBB/includes/template/twig/node/php.php
index cf60ef33fc..83481b1d69 100644
--- a/phpBB/includes/template/twig/node/php.php
+++ b/phpBB/includes/template/twig/node/php.php
@@ -28,13 +28,17 @@ class phpbb_template_twig_node_php extends Twig_Node
{
$compiler->addDebugInfo($this);
- $config = $this->environment->get_phpbb_config();
-
- if ($config['tpl_allow_php'])
+ if (!$config['tpl_allow_php'])
{
$compiler
- ->raw($this->getNode('text')->getAttribute('data'))
+ ->write("// PHP Disabled\n")
;
+
+ return;
}
+
+ $compiler
+ ->raw($this->getNode('text')->getAttribute('data'))
+ ;
}
}