ZF-6289: Zend_Config_Writer_Ini jumbling sections
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:
menuName = "Multi Record" tableName = "multi_record" [fields] data = "data"
type = "multi" order = 1
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.