From 23efa7b1c2e926ccdc89e5848000c4accd0c3106 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 5 Jul 2014 13:16:15 +0200 Subject: [PATCH] fixed potential exception --- lib/Twig/Node/Expression/Call.php | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/lib/Twig/Node/Expression/Call.php b/lib/Twig/Node/Expression/Call.php index d019696..912b837 100644 --- a/lib/Twig/Node/Expression/Call.php +++ b/lib/Twig/Node/Expression/Call.php @@ -12,10 +12,8 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression { protected function compileCallable(Twig_Compiler $compiler) { - $callable = $this->getAttribute('callable'); - $closingParenthesis = false; - if ($callable) { + if ($this->hasAttribute('callable') && $callable = $this->getAttribute('callable')) { if (is_string($callable)) { $compiler->raw($callable); } elseif (is_array($callable) && $callable[0] instanceof Twig_ExtensionInterface) { -- 1.7.2.5