Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
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
| This issue is duplicated by: | ||||
| ZF-6289 | Zend_Config_Writer_Ini jumbling sections |
|
|
|
This issue already was resolved in trunk see
ZF-6289not applied in branch release-1.10.ZF-6289not applied in branch release-1.10.