Fixed notice in Twig_Error::guessTemplateLine
authorGrégoire Pineau <lyrixx@lyrixx.info>
Fri, 23 Mar 2012 22:59:21 +0000 (23:59 +0100)
committerGrégoire Pineau <lyrixx@lyrixx.info>
Fri, 23 Mar 2012 22:59:21 +0000 (23:59 +0100)
lib/Twig/Error.php [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 77418f4..c1b9f32
@@ -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;
             }
         }