Edit report at https://bugs.php.net/bug.php?id=38409&edit=1
ID: 38409
Comment by: mruz at poczta dot onet dot pl
Reported by: yury at shurup dot com
Summary: parse_ini_file() looses the type of booleans
Status: Closed
Type: Feature/Change Request
Package: PHP options/info functions
Operating System: Ubuntu 8.04.1
PHP Version: 5.2.4-2ubuntu5.4 with Suhosin-Patch 0.9.6.2 (cli)
Assigned To: datibbaw
Block user comment: N
Private report: N
New Comment:
On the 5.6.6 I still have the problem.
Previous Comments:
------------------------------------------------------------------------
[2014-09-01 23:01:38] datibbaw@php.net
The fix for this bug has been committed.
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/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Fixed in repo: http://git.php.net/?p=php-src.git;a=commit;h=5270ee1aef83a4cd17dc1175052ab3b9da94717a
The changes are slated for 5.6.1 onwards.
------------------------------------------------------------------------
[2013-12-02 15:25:27] chudinov at yahoo dot com
Versions 5.4 and 5.5 have same problem.
It is quite annoying to cast that is true or false to actually boolean type!
------------------------------------------------------------------------
[2012-03-15 10:17:58] adria dot cidre at gmail dot com
Still not working on Centos over PHP 5.3.10
------------------------------------------------------------------------
[2011-12-19 19:21:23] pwinnski at gmail dot com
PHP 5.3.6 on Centos. Still not fixed, so I must explicitly cast to boolean in the
code that reads the ini file.
------------------------------------------------------------------------
[2010-08-31 23:33:03] guy dot paddock at redbottledesign dot com
Hrm, it also looks like there's a similar problem for integers -- they become integer strings,
so is_int() returns FALSE on them.
Why doesn't parse_ini_file() translate values to the appropriate type?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=38409
--
Edit this bug report at https://bugs.php.net/bug.php?id=38409&edit=1