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

    • Type: Bug
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 5.0.0-dev
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      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

            Assignee:
            Unassigned
            Reporter:
            ceonizm Boukhalfa François
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: