From ca3d5a821dae409162d301ed369f9d58cacbce07 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 29 Aug 2011 18:47:24 +0200 Subject: [PATCH] simplified previous merge --- lib/Twig/Error.php | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/lib/Twig/Error.php b/lib/Twig/Error.php index ada7bf0..ed0836c 100644 --- a/lib/Twig/Error.php +++ b/lib/Twig/Error.php @@ -175,9 +175,7 @@ class Twig_Error extends Exception $tokens = token_get_all(file_get_contents($r->getFilename())); $templateline = -1; $template = null; - for ($j = 0, $tokensSize = count($tokens); $j < $tokensSize; $j++) { - $token = $tokens[$j]; - + foreach ($tokens as $token) { if (isset($token[2]) && $token[2] >= $line) { return array($templateline, $template); } -- 1.7.2.5