Zend Framework

Zend_Config_Writer_Ini does not write properly to global namespace

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.1
  • Fix Version/s: 1.10.8
  • Component/s: Zend_Config
  • Labels:
    None

Description

If a config param is declared in the global namespace, after a section, Zend_Config_Writer_Ini does not write properly to the global namespace, instead, the param becomes part of the last section in the ini.

For example

----------------------------------------------------------------------
#sample config (sample.ini)
user_locale = "en_GB"
auth_mech = "DatabaseAuth"
[license]
key = "DC_CAAP"
type = "PRO"
------------------------------------------------------------------------
#code
<?php
$config = new Zend_Config_Ini('sample.ini');
$config->theme = "Classic";
$item = new Zend_Config_Writer_Ini(array('config' => $config, 'filename' => 'sample.ini'));

$item->write();
?>
---------------------------------------------------------------------
#output (sample.ini)
user_locale = "en_GB"
auth_mech = "DatabaseAuth"
[license]
key = "DC_CAAP"
type = "PRO"
theme = "Classic"

--------------------------------------------------------------------------

#expected output
user_locale = "en_GB"
auth_mech = "DatabaseAuth"
theme = "Classic"
[license]
key = "DC_CAAP"
type = "PRO"

-------------------------------------------------------------------

Issue Links

Activity

Hide
Ramon Henrique Ornelas added a comment -

This issue already was resolved in trunk see ZF-6289 not applied in branch release-1.10.

Show
Ramon Henrique Ornelas added a comment - This issue already was resolved in trunk see ZF-6289 not applied in branch release-1.10.
Hide
Ramon Henrique Ornelas added a comment -

Applied to branch release-1.10 in r22869.

Show
Ramon Henrique Ornelas added a comment - Applied to branch release-1.10 in r22869.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: