projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
721bebc
)
made a better test
author
Fabien Potencier
<fabien.potencier@gmail.com>
Tue, 28 Aug 2012 15:05:50 +0000 (17:05 +0200)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Tue, 28 Aug 2012 15:05:50 +0000 (17:05 +0200)
lib/Twig/Parser.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Parser.php
b/lib/Twig/Parser.php
index
5264238
..
d73cfde
100644
(file)
--- a/
lib/Twig/Parser.php
+++ b/
lib/Twig/Parser.php
@@
-163,7
+163,7
@@
class Twig_Parser implements Twig_ParserInterface
if (null === $subparser) {
if (null !== $test) {
$error = sprintf('Unexpected tag name "%s"', $token->getValue());
- if (is_array($test) && isset($test[0]) && is_object($test[0])) {
+ if (is_array($test) && isset($test[0]) && $test[0] instanceof Twig_TokenParserInterface) {
$error .= sprintf(' (expecting closing tag for the "%s" tag defined near line %s)', $test[0]->getTag(), $lineno);
}