From: Fabien Potencier Date: Sat, 5 Jul 2014 11:16:15 +0000 (+0200) Subject: fixed potential exception X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=23efa7b1c2e926ccdc89e5848000c4accd0c3106;p=konrad%2Ftwig.git fixed potential exception --- 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) {