parse_ini_file keys that start/end with underscore
| Bug #44842 | parse_ini_file keys that start/end with underscore | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2008-04-26 17:12 UTC | Modified: | 2008-08-17 21:59 UTC |
|
||||||||||
| From: | galactic dot void at googlemail dot com | Assigned: | ||||||||||||
| Status: | Closed | Package: | Filesystem function related | |||||||||||
| PHP Version: | 5.3CVS-2008-04-26 (snap) | OS: | * | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2008-04-26 17:12 UTC] galactic dot void at googlemail dot com
Description:
------------
parse_ini_file cannot handle keys that start/end with an underscore.
Reproduce code:
---------------
// my.ini
test = 1
_test = 2
test_ = 3
[section]
test = 1
_test = 2
test_ = 3
// ini.php
print_r(parse_ini_file('my.ini', true));
Expected result:
----------------
Array
(
[test] => 1
[_test] => 2
[test_] => 3
[section] => Array
(
[test] => 1
[_test] => 2
[test_] => 3
)
)
Actual result:
--------------
Array
(
[test] => 1
)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2008-08-17 21:59 UTC] lbarnaud@php.net