Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16537

piped "or" operator fails when TemplateCompile is set to disabled

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • Future
    • 4.2.0
    • None
    • Operating System:
      PHP Version: 5.2.6
      Database and version: MySQL 5
      Browser (and version): FF 3.5

    Description

      When template compile is disabled, an "or" statement, written with the pipe syntax will return false when it should not

      If the "or" statement is written with 2 arguments it will work fine regardless TemplateCompile is enabled or not.

      Steps to reproduce

      1. Disable TemplateCompile in the [TemplateSettings] section of your site.ini.append.php :

      [TemplateSettings]
      TemplateCompile=disabled
      

      2. Append the following code into a template

      Piped OR : 
      {if true()|or(false())}
          OK
      {else}
          KO
      {/if}
      <br />
      
      2 Args OR :
      {if or(true(),false())}
          OK
      {else}
          KO
      {/if}
      <br />
      

      3. The output will be :

      > Piped OR : KO
      > 2 Args OR : OK

      Attachments

        Activity

          People

            unknown unknown
            huge huge
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: