Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11828

Twig DEFINE is causing errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.0-a1
    • 3.1.0-dev
    • Template Engine
    • None

      The following code:

      <!-- DEFINE $FOO -->bar<!-- ENDDEFINE -->

      when both DEFINE and ENDDEFINE are on same line will trigger error message.
      If DEFINE and ENDDEFINE are on separate lines it works fine.

      Sample error message:

      Fatal error: Uncaught exception 'Twig_Error_Syntax' with message 'Unexpected token "operator" of value ">" in "overall_header.html" at line 40' in /vendor/twig/twig/lib/Twig/ExpressionParser.php:170 
       
      Stack trace: 
      #0 /vendor/twig/twig/lib/Twig/ExpressionParser.php(84): Twig_ExpressionParser->parsePrimaryExpression() 
      #1 /vendor/twig/twig/lib/Twig/ExpressionParser.php(41): Twig_ExpressionParser->getPrimary() 
      #2 /vendor/twig/twig/lib/Twig/ExpressionParser.php(72): Twig_ExpressionParser->parseExpression(500) 
      #3 /vendor/twig/twig/lib/Twig/ExpressionParser.php(41): Twig_ExpressionParser->getPrimary() 
      #4 /vendor/twig/twig/lib/Twig/ExpressionParser.php(50): Twig_ExpressionParser->parseExpression(31) 
      #5 in /vendor/twig/twig/lib/Twig/ExpressionParser.php on line 170

            EXreaction EXreaction [X] (Inactive)
            Arty Vjacheslav Trushkin [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: