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

Changes to icon.ini size array could result in 'undefined index' error

    XMLWordPrintable

    Details

      Description

      Icon themes can be modified using the icon.ini file. Changes to this file, however, could cause unexpected behavior when the IconSettings/Size does not exist in the IconSettings/Sizes array. There is pre-existing code that is supposed to account for this scenario but instead it triggers an "undfined index" error because the fallback is looking for a numbered key.

      To trigger the error, modify the icon.ini that is in use for your siteaccess and change the default size to something that does not exist.

      icon.ini
      [IconSettings]
      # Defined sizes, each size refers to the name of the subdirectory
      # of the icon theme. If the name contains two numbers with an
      # x in between it will be considered to be the width and height
      # of the icon, if not no size is will be given
      Size=foo
      Sizes[]
      Sizes[normal]=32x32
      Sizes[small]=16x16
      

      I have a fix proposed here: https://github.com/ezsystems/ezpublish-legacy/pull/1290

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            tvharms Tyler Harms
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: