Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.12

Bug #3298 Processing XML to array and then back to XML
Submitted: 2005-01-26 04:36 UTC
From: daniel at assertio dot es Assigned: ryansking
Status: Closed Package: Config
PHP Version: 5.0.2 OS: Win XP
Roadmaps: (Not assigned)    

 [2005-01-26 04:36 UTC] daniel at assertio dot es
Description: ------------ Hi, The idea was to write a function / method to turn a configuration into a QuickForm to ease the editing. I thought of reading the XML file into an array, create an analogous form, and then write back the configuration using the submitted form values. I found the problem that, if there are elements with the same name, they are not rendered back in the same way. Please run the supplied code to reproduce. Reproduce code: --------------- Patch: File PEAR/Config/Container/PHPArray.php, lines 108 to 114 changed to: default: if (is_array($value)) { if (is_integer(key($value))) { foreach ($value as $nestedValue) { $section =& $container->createSection($key); $this->_parseArray($nestedValue, $section); } } else { $section =& $container->createSection($key); $this->_parseArray($value, $section); } } else { $container->createDirective($key, $value); }


 [2005-02-10 01:03 UTC] ryansking at mac dot com
Ok. I applied the patch you supplied. Please test the cvs version.
 [2005-02-12 14:19 UTC] ryansking at mac dot com
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at This should be fixed in 1.10.4.