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

Empty let or default block will cause warnings

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.6.12, 3.7.10, 3.8.7, 3.9.0rc1
    • 3.8.3
    • Misc
    • None
    • Version: 3.8.3
      PHP Version:
      Webserver:
      Database:

    Description

      Suppose you have this in a template:

      {let $var='test'}
      
      {/let}
      

      This will cause PHP warnings:

      array_keys() [<a href='function.array-keys'>function.array-keys</a>]: The first argument should be an array in lib/eztemplate/classes/eztemplatesetfunction.php on line 433
      
      Invalid argument supplied for foreach() in lib/eztemplate/classes/eztemplatesetfunction.php on line 433
      

      I know empty let and default blocks do not make sense, but they shouldn't throw PHP warnings. Maybe the users should get another meaningful warning?

      Attachments

        Activity

          People

            vp vp
            cyberwolf cyberwolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: