|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-05-26 04:18 UTC] felipe@php.net
-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
-Assigned To:
+Assigned To: felipe
[2010-05-26 04:18 UTC] felipe@php.net
[2010-05-26 04:18 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 14:00:01 2025 UTC |
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