Issues

ZF-10095: Zend_Config_Writer_Ini does not write properly to global namespace

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"


Comments

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

Applied to branch release-1.10 in r22869.