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

ezini.php incorrect placement for values when an array is resetted in ini.append.php file

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • None
    • 5.0.0-dev
    • None
    • debian squeeze php-5.3.17 apache2

    Description

      steps to reproduce:
      assuming we got a siteaccess "mysiteaccess" and an active extension "myextension"
      1- redeclare an array in a siteaccess ini file for example
      settings/mysiteaccess/design.ini.append.php
      [StylesheetSettings]
      CSSFileList[]
      CSSFileList[]=toto.css

      2- add a value to this array in an extension settings;
      extension/myextension/settings/design.ini.append.php
      [StylesheetSettings]
      CSSFileList[]=otherfile.css

      3- look the results in admin /settings/view
      the placement for otherfile.css is marked siteaccess which is incorrect

      Explanation:
      The parser class (ezini.php) got a BlockValuesPlacement array which store placement.
      The problem is the key corresponding to the property is not reinitialized when an array is redelared in an ini file.
      This causes an offset compared to the keys stored in BlockValues.

      To resolve this problem I propose the following change on ezini.php (line 790)

      $this->BlockValuesPlacement[$currentBlock][$varName] = array( $file );

      instead of

      $this->BlockValuesPlacement[$currentBlock][$varName][] = $file;

      after that I got the expected dispançoislay in settings/view.

      I checked this on 2012.9 and 2012.4

      Hope this helps
      Regards

      Francois Boukhalfa

      Attachments

        Activity

          People

            Unassigned Unassigned
            ceonizm ceonizm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: