Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: Template Engine
    • Labels:
      None

      Description

      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

        Issue Links

          Activity

          Hide
          nickvergessen Joas Schilling added a comment -

          Use

          <!-- DEFINE $FOO = 'bar' -->

          for now

          Show
          nickvergessen Joas Schilling added a comment - Use <!-- DEFINE $FOO = 'bar' --> for now
          Hide
          Arty Vjacheslav Trushkin added a comment -

          Which works for minor things where value is a simple string, but not for complex code. See https://github.com/phpbb/phpbb3/pull/1666/files#r6147334

          Show
          Arty Vjacheslav Trushkin added a comment - Which works for minor things where value is a simple string, but not for complex code. See https://github.com/phpbb/phpbb3/pull/1666/files#r6147334

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development