Security update to Drupal 8.4.6 with PHP held back to 7.0.27 to match the stoneboat...
[yaffs-website] / vendor / twig / twig / lib / Twig / TokenParser / For.php
index 6407afa819ed2d3d02072f0b2d29519d7a1f2dec..8e737c5fafb68cdf67e1107c3a8b5f0b15a55cb7 100644 (file)
@@ -40,7 +40,7 @@ class Twig_TokenParser_For extends Twig_TokenParser
 
         $stream->expect(Twig_Token::BLOCK_END_TYPE);
         $body = $this->parser->subparse(array($this, 'decideForFork'));
-        if ($stream->next()->getValue() == 'else') {
+        if ('else' == $stream->next()->getValue()) {
             $stream->expect(Twig_Token::BLOCK_END_TYPE);
             $else = $this->parser->subparse(array($this, 'decideForEnd'), true);
         } else {
@@ -123,3 +123,5 @@ class Twig_TokenParser_For extends Twig_TokenParser
         return 'for';
     }
 }
+
+class_alias('Twig_TokenParser_For', 'Twig\TokenParser\ForTokenParser', false);