projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
2e90373
)
fixed CS
author
Fabien Potencier
<fabien.potencier@gmail.com>
Mon, 29 Aug 2011 16:26:53 +0000 (18:26 +0200)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Mon, 29 Aug 2011 16:27:12 +0000 (18:27 +0200)
lib/Twig/Error.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Error.php
b/lib/Twig/Error.php
index
5659e85
..
ada7bf0
100644
(file)
--- a/
lib/Twig/Error.php
+++ b/
lib/Twig/Error.php
@@
-175,10
+175,9
@@
class Twig_Error extends Exception
$tokens = token_get_all(file_get_contents($r->getFilename()));
$templateline = -1;
$template = null;
- $tokensSize = count($tokens);
- for($j = 0; $j < $tokensSize; $j++) {
+ for ($j = 0, $tokensSize = count($tokens); $j < $tokensSize; $j++) {
$token = $tokens[$j];
-
+
if (isset($token[2]) && $token[2] >= $line) {
return array($templateline, $template);
}