Description

The issue is with Zend_Config_Writer_Ini. When you build a Zend_Config object and add data elements to it, the writer writes them out to the file in the order they were added. This creates problems when you add sections, then add more root level data to the config afterwards. For example, creating an object like this:
$schema = new Zend_Config(array(
'menuName' => $this->menuName,
'tableName' => $this->tableName,
'fields' => array(),
'type' => $this->type,
'order' => $this->order
), true);
The fields section is build later (i have the code available but i don't think it matters) but the basic idea is to have a [fields] section with various elements beneath it. When Zend_Config_Writer_Ini writes this out to the file, it will print out like this:

This puts type and order under the [fields] section, when it should be up next to tableName and menuName, which is under the root section. I feel the solution would be to process seperate sections last, so all root keys are not written at the bottom like this changing their context.

Comments

Posted by Jan Pieper (jpieper) on 2010-04-25T01:09:34.000+0000

Fixed in r21983.

Posted by Rob Allen (rob) on 2010-06-02T11:42:57.000+0000

Jan,

You've marked this as fixed in 1.10.4, but it doesn't seem to have been merged from trunk to the branch?

Is there a reason it wasn't merged?

Posted by Jan Pieper (jpieper) on 2010-06-02T23:43:55.000+0000

I only commited my changes to trunk but there shouldn't be any problems to not merge them to the mentioned branch or a newer one.