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

 ID:                 54974
 Updated by:         dtajchre...@php.net
 Reported by:        dhendric at adobe dot com
 Summary:            parse_ini_file() does not handle parens in property
                     values
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Unknown/Other Function
 Operating System:   RHEL 5
 PHP Version:        5.2.17
 Block user comment: N
 Private report:     N

 New Comment:

Quote free text like that.



[david@oslo:~]$ cat t.php 

<?php



$ini = <<<INI

copyright="Copyright (c) 2001-2010 Adobe Systems Incorporated. All rights"

INI;



var_dump(parse_ini_string($ini));



[david@oslo:~]$ php t.php 

array(1) {

  ["copyright"]=>

  string(62) "Copyright (c) 2001-2010 Adobe Systems Incorporated. All rights"

}

[david@oslo:~]$


Previous Comments:
------------------------------------------------------------------------
[2011-06-02 04:13:27] dhendric at adobe dot com

Description:
------------
---

>From manual page: http://www.php.net/function.parse-ini-file#Description

---



Using parse_ini_file() on a ini files that contain parens () in the property 
values throws and error.



Example of Test.ini file:

#S7Z OK

#Wed Jun 01 18:58:52 PDT 2011

copyright=Copyright (c) 2001-2010 Adobe Systems Incorporated. All rights 
reserved.

imageServer.buildDate=Mon Apr 25 02:18:36 PDT 2011

imageServer.startTime=Mon Apr 25 16:10:52 PDT 2011

imageServer.version=4.9.2

Test script:
---------------
print_r(parse_ini_file("Test.ini"));

Expected result:
----------------
The parse_ini_file() should process any character in the property value else 
what good is it.

Actual result:
--------------
Warning: syntax error, unexpected '(' in Test.ini on line 3 in 
/opt/lampp/htdocs/working_deirdra/serverlist/serverlist_ajax.php on line 82


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54974&edit=1

Reply via email to