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

Bug #11435 IniFile and IniCommented do not correctly quote some characters
Submitted: 2007-06-25 15:13 UTC
From: mbeccati Assigned: aashley
Status: Closed Package: Config (version 1.10.11)
PHP Version: 5.2.3 OS: Any
Roadmaps: (Not assigned)    
Subscription  


 [2007-06-25 15:13 UTC] mbeccati (Matteo Beccati)
Description: ------------ Characters such as "!", "|", "&", "(" and ")" are not correctly quoted by the IniFile and IniCommented writers and cause errors or are not correctly loaded by parse_ini_file(). Also a wrong behaviour happens when the content of a directive is "none", which is parsed back as an empty string. Attaching a patch file, I hope a test script isn't needed ;)

Comments

 [2007-07-02 06:05 UTC] aashley (Adam Ashley)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I've added your patch but there is no way to get IniFile to parse some of those characters in (~ ! & being the worst offenders). The built-in parser just rejects it as malformed with those in it. IniCommented will now read and write all the extra characters correctly.