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

optimize/improve AND logic operator in template language

    Details

      Description

      currently the AND operator evaluates all template operators that are its parameters, before the "and" operation is done.
      This is not optimized and causes unexpected warnings/errors.

      Example:

      {if and(ezhttp_hasvariable( 'SearchContentClassID', 'get' ), ezhttp( 'SearchContentClassID', 'get')|ne("-1")) }
          ...
          ...
      {else}
          ...
      {/if}
      

      executes both operators (ezhttp_hasvariable and ezhttp) even if SearchContentClassID does not exist. This causes template error:

      Error: eZTemplate:ezhttp 	Dec 22 2011 15:52:37
      Unknown get variable 'SearchContentClassID'
      

        Issue Links

          Activity

          Hide
          Damien Pobel (eZ) added a comment -

          old duplicate issue: http://issues.ez.no/13075

          Show
          Damien Pobel (eZ) added a comment - old duplicate issue: http://issues.ez.no/13075

            People

            • Assignee:
              unknown
              Reporter:
              Jarosław-- Heba
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: