Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix twig error lineno off by 2

  • Loading branch information...
commit 7c5854bba94fb5de06e4a145dee01d172fbf7523 1 parent 55b76c1
Charles authored committed
2  lib/Twig/Compiler.php
View
@@ -217,7 +217,7 @@ public function addDebugInfo(Twig_NodeInterface $node)
$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");
4 test/Twig/Tests/Node/ModuleTest.php
View
@@ -90,7 +90,7 @@ public function getTemplateName()
public function getDebugInfo()
{
- return array ( 17 => 1,);
+ return array ( 19 => 1,);
}
}
EOF
@@ -142,7 +142,7 @@ public function isTraitable()
public function getDebugInfo()
{
- return array ( 22 => 1,);
+ return array ( 24 => 1,);
}
}
EOF
2  test/Twig/Tests/Node/SandboxedModuleTest.php
View
@@ -98,7 +98,7 @@ public function getTemplateName()
public function getDebugInfo()
{
- return array ( 18 => 1,);
+ return array ( 20 => 1,);
}
}
EOF
Please sign in to comment.
Something went wrong with that request. Please try again.