#34354 [Opn->Csd]: parse_ini_file interprets "null" as empty string
| From: | vrana@php.net | Date: | Mon, 05 Sep 2005 09:02:18 +0000 |
| Subject: | #34354 [Opn->Csd]: parse_ini_file interprets "null" as empty string | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969369890@lists.php.net to get a copy of this message | ||
ID: 34354
Updated by: vrana@php.net
Reported By: php dot net at sharpdreams dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Win32
PHP Version: 5CVS-2005-09-03 (snap)
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
"Values null, no and false results in "", yes and true results in
"1"."
Previous Comments:
------------------------------------------------------------------------
[2005-09-05 00:09:02] sniper@php.net
reclassified
------------------------------------------------------------------------
[2005-09-03 03:53:56] php dot net at sharpdreams dot com
Description:
------------
The documentation is unclear on this aspect so I am presuming this is a
bug:
Keys in INI files set to null (no quotes) are parsed as empty string ""
instead of a true null.
If this is intended behavior then it should be documented as such.
Reproduce code:
---------------
-- test.ini --
[foo]
bar = null
-- test.php --
var_dump( parse_ini_file( "test.ini" ) );
Expected result:
----------------
array(1) {
["foo"]=>
NULL
}
Actual result:
--------------
array(1) {
["foo"]=>
string(0) ""
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34354&edit=1