Bug #55260 [Opn->Bgs]: parse_ini_file breaks with ampersand
| From: | aharvey@php.net | Date: | Thu, 21 Jul 2011 18:35:52 +0000 |
| Subject: | Bug #55260 [Opn->Bgs]: parse_ini_file breaks with ampersand | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-162088@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55260&edit=1
ID: 55260
Updated by: aharvey@php.net
Reported by: austinb at inn-soft dot com
Summary: parse_ini_file breaks with ampersand
-Status: Open
+Status: Bogus
Type: Bug
-Package: Unknown/Other Function
+Package: Filesystem function related
Operating System: ubuntu4.9
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
INI comments start with a semi-colon (;), not //. As a result, that line gets
parsed like any other INI directive, and it's an invalid one, hence the error.
Previous Comments:
------------------------------------------------------------------------
[2011-07-21 11:48:22] austinb at inn-soft dot com
Description:
------------
With an ampersand in the commented section of code, it crashes the function,
always returns false.
Test script:
---------------
INI FILE
//-- SETUP FEE, INCLUDES LICENSE FOR HBP & TIME TO INSTALL IT
setupFee="79.99";
PHP
var_dump(parse_ini_file('./packageInfo.ini'));
RETURN
bool(false)
INI FILE
//-- SETUP FEE, INCLUDES LICENSE FOR HBP AND TIME TO INSTALL IT
setupFee="79.99";
PHP
var_dump(parse_ini_file('./packageInfo.ini'));
RETURN
array(1) { ["setupFee"]=> string(5) "79.99" }
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55260&edit=1