#36046 [Opn->Csd]: Bad line number in parse_ini_file error message
ID: 36046
Updated by: iliaa@php.net
Reported By: php at koterov dot ru
-Status: Open
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: Windows XP
PHP Version: 5.1.2
New Comment:
This bug has been fixed in CVS.
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/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-01-17 12:00:31] php at koterov dot ru
Description:
------------
When using multiline INI values, line counter breaks. Seems parser
always perceive one directive as one line. So, debugging becomes
difficult where are errors in INI file (see example below, directive
[other = aa " bb "] has syntax error.
Reproduce code:
---------------
-- t_pif_line.php --
<?php
parse_ini_file('t_pif_line.ini');
?>
-- t_pif_line.ini --
key = "aaa
bbb
ccc
"
other = aa " bb "
Expected result:
----------------
Warning: Error parsing t_pif_line.ini on line 5 in
P:\home\localhost\www\t_pif_line.php on line 2
Actual result:
--------------
Warning: Error parsing t_pif_line.ini on line 2 in
P:\home\localhost\www\t_pif_line.php on line 2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36046&edit=1
Thread (2 messages)