mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 19:06:40 +00:00
Fix twig error lineno off by 2
This commit is contained in:
committed by
Fabien Potencier
parent
55b76c1799
commit
7c5854bba9
@@ -217,7 +217,7 @@ class Twig_Compiler implements Twig_CompilerInterface
|
||||
$this->sourceLine += substr_count($this->source, "\n", $this->sourceOffset);
|
||||
}
|
||||
$this->sourceOffset = strlen($this->source);
|
||||
$this->debugInfo[$this->sourceLine] = $node->getLine();
|
||||
$this->debugInfo[$this->sourceLine + 2] = $node->getLine();
|
||||
|
||||
$this->lastLine = $node->getLine();
|
||||
$this->write("// line {$node->getLine()}\n");
|
||||
|
||||
@@ -90,7 +90,7 @@ class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
|
||||
|
||||
public function getDebugInfo()
|
||||
{
|
||||
return array ( 17 => 1,);
|
||||
return array ( 19 => 1,);
|
||||
}
|
||||
}
|
||||
EOF
|
||||
@@ -142,7 +142,7 @@ class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
|
||||
|
||||
public function getDebugInfo()
|
||||
{
|
||||
return array ( 22 => 1,);
|
||||
return array ( 24 => 1,);
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
@@ -98,7 +98,7 @@ class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
|
||||
|
||||
public function getDebugInfo()
|
||||
{
|
||||
return array ( 18 => 1,);
|
||||
return array ( 20 => 1,);
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user