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

and( value1, value2...) throws errors because value2 is checked though value1 is false

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 2011.10
    • None

    Description

      Hi,

      a very old problem is annoying me:

      {if and( ezhttp_hasvariable( 'gwfmobiledevicecheck', 'cookie' ),
                  ezhttp( 'gwfmobiledevicecheck', 'cookie' )|int|eq(1) )}
      

      This writes an error entry in the error.log because the cookie doesn't exists. I would expect that if the first one already returns false, the second isn't executed.

      The only way to avoid this is changing this into:

      {if ezhttp_hasvariable( 'gwfmobiledevicecheck', 'cookie' )}
          {if ezhttp( 'gwfmobiledevicecheck', 'cookie' )|int|eq(1)}
      
      

      Best wishes,
      Georg.

      Attachments

        Activity

          People

            unknown unknown
            emil.webber emil.webber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: