note 112409 deleted from function.parse-ini-string by googleguy
| From: | googleguy@php.net | Date: | Thu, 13 Jun 2013 14:27:33 +0000 |
| Subject: | note 112409 deleted from function.parse-ini-string by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-195196@lists.php.net to get a copy of this message | ||
Note Submitter: martijn at vanderlee dot com
----
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.