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  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 43 - 12 = ?

 
 [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.