mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 04:16:28 +00:00
Fix broken variable reference
This commit is contained in:
@@ -58,7 +58,7 @@ class Twig_TokenStream
|
|||||||
public function next()
|
public function next()
|
||||||
{
|
{
|
||||||
if (!isset($this->tokens[++$this->current])) {
|
if (!isset($this->tokens[++$this->current])) {
|
||||||
throw new Twig_Error_Syntax('Unexpected end of template', $this->token[$this->current - 1]->getLine(), $this->filename);
|
throw new Twig_Error_Syntax('Unexpected end of template', $this->tokens[$this->current - 1]->getLine(), $this->filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->tokens[$this->current - 1];
|
return $this->tokens[$this->current - 1];
|
||||||
@@ -97,7 +97,7 @@ class Twig_TokenStream
|
|||||||
public function look($number = 1)
|
public function look($number = 1)
|
||||||
{
|
{
|
||||||
if (!isset($this->tokens[$this->current + $number])) {
|
if (!isset($this->tokens[$this->current + $number])) {
|
||||||
throw new Twig_Error_Syntax('Unexpected end of template', $this->token[$this->current + $number - 1]->getLine(), $this->filename);
|
throw new Twig_Error_Syntax('Unexpected end of template', $this->tokens[$this->current + $number - 1]->getLine(), $this->filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->tokens[$this->current + $number];
|
return $this->tokens[$this->current + $number];
|
||||||
|
|||||||
Reference in New Issue
Block a user