Project

General

Profile

« Previous | Next » 

Revision 1852

Added by darkviper over 11 years ago

updated Twig template engine to stable version 1.11.1 step2

View differences:

Block.php
35 35
        $stream = $this->parser->getStream();
36 36
        $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue();
37 37
        if ($this->parser->hasBlock($name)) {
38
            throw new Twig_Error_Syntax(sprintf("The block '$name' has already been defined line %d", $this->parser->getBlock($name)->getLine()), $lineno);
38
            throw new Twig_Error_Syntax(sprintf("The block '$name' has already been defined line %d", $this->parser->getBlock($name)->getLine()), $stream->getCurrent()->getLine(), $stream->getFilename());
39 39
        }
40 40
        $this->parser->setBlock($name, $block = new Twig_Node_Block($name, new Twig_Node(array()), $lineno));
41 41
        $this->parser->pushLocalScope();
......
49 49
                $value = $stream->next()->getValue();
50 50

  
51 51
                if ($value != $name) {
52
                    throw new Twig_Error_Syntax(sprintf("Expected endblock for block '$name' (but %s given)", $value), $lineno);
52
                    throw new Twig_Error_Syntax(sprintf("Expected endblock for block '$name' (but %s given)", $value), $stream->getCurrent()->getLine(), $stream->getFilename());
53 53
                }
54 54
            }
55 55
        } else {

Also available in: Unified diff