note 112409 added to function.parse-ini-string
| From: | martijn at vanderlee dot com | Date: | Thu, 13 Jun 2013 13:24:21 +0000 |
| Subject: | note 112409 added to function.parse-ini-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195194@lists.php.net to get a copy of this message | ||
In PHP 5.3.0 upto and including 5.3.3 this function does not work properly when using $scanner_mode
INI_SCANNER_RAW.
It may return an error message "syntax error, unexpected $end in Unknown on line 16" (line
number being the number of lines) if the $ini string does NOT end with a newline ("\n")
and you're using INI_SCANNER_RAW.
Simplest fix is to add a newline ("\n") to each and every call to the function as such:
parse_ini_string($ini_string . "\n", true, INI_SCANNER_RAW);
p.s. The value of $process_sections does not affect this bug.
----
Server IP: 69.147.83.199
Probable Submitter: 188.205.59.90
----
Manual Page -- http://php.net/manual/en/function.parse-ini-string.php
Edit -- https://master.php.net/note/edit/112409
Del: integrated -- https://master.php.net/note/delete/112409/integrated
Del: useless -- https://master.php.net/note/delete/112409/useless
Del: bad code -- https://master.php.net/note/delete/112409/bad+code
Del: spam -- https://master.php.net/note/delete/112409/spam
Del: non-english -- https://master.php.net/note/delete/112409/non-english
Del: in docs -- https://master.php.net/note/delete/112409/in+docs
Del: other reasons-- https://master.php.net/note/delete/112409
Reject -- https://master.php.net/note/reject/112409
Search -- https://master.php.net/manage/user-notes.php