fixed typos
authorFabien Potencier <fabien.potencier@gmail.com>
Tue, 8 Feb 2011 14:39:03 +0000 (15:39 +0100)
committerFabien Potencier <fabien.potencier@gmail.com>
Tue, 8 Feb 2011 14:39:03 +0000 (15:39 +0100)
lib/Twig/ExpressionParser.php

index fbf927e..829481e 100644 (file)
@@ -234,11 +234,11 @@ class Twig_ExpressionParser
 
         if ('parent' === $node->getAttribute('name')) {
             if (!count($this->parser->getBlockStack())) {
-                throw new Twig_Error_Syntax('Calling "parent" outside a block is forbidden', $token->getLine());
+                throw new Twig_Error_Syntax('Calling "parent" outside a block is forbidden', $node->getLine());
             }
 
             if (!$this->parser->getParent()) {
-                throw new Twig_Error_Syntax('Calling "parent" on a template that does not extend another one is forbidden', $token->getLine());
+                throw new Twig_Error_Syntax('Calling "parent" on a template that does not extend another one is forbidden', $node->getLine());
             }
 
             return new Twig_Node_Expression_Parent($this->parser->peekBlockStack(), $node->getLine());