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

 ID:               51899
 Updated by:       fel...@php.net
 Reported by:      aigors at inbox dot lv
-Summary:          Parse error in parse_ini_file function
+Summary:          Parse error in parse_ini_file() function when empy
                   value followed by no newline
-Status:           Open
+Status:           Closed
 Type:             Bug
 Package:          Filesystem function related
 Operating System: Windows XP
 PHP Version:      5.3.2
-Assigned To:      
+Assigned To:      felipe

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2010-05-24 15:36:23] aigors at inbox dot lv

Description:
------------
The function parse_ini_file raises "PHP Warning:  syntax error,
unexpected $end" when ini file has empty last value assignment with no
new line after it:



parse_ini_file.ini

a=4

b=



(no new line after the 2nd line).

Test script:
---------------
$data = parse_ini_file('parse_ini_file.ini');

print_r($data);

Expected result:
----------------
Array

(

    [a] => 4

    [b] =>

)

Actual result:
--------------
PHP Warning:  syntax error, unexpected $end in parse_ini_file.ini on
line 2

 in C:\work\parse_ini_file.php on line 3


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



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

Reply via email to