Fixed notice in Twig_Error::guessTemplateLine

This commit is contained in:
Grégoire Pineau
2012-03-23 23:59:21 +01:00
parent c2a53a2614
commit d0ae0294c0
Regular → Executable
+1 -1
View File
@@ -164,7 +164,7 @@ class Twig_Error extends Exception
protected function guessTemplateLine($trace)
{
foreach ($trace['object']->getDebugInfo() as $codeLine => $templateLine) {
if ($codeLine <= $trace['line']) {
if (isset($trace['line']) && $codeLine <= $trace['line']) {
return $templateLine;
}
}