Edit report at https://bugs.php.net/bug.php?id=55260&edit=1

 ID:                 55260
 Updated by:         ahar...@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

Reply via email to