php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36046 Bad line number in parse_ini_file error message
Submitted: 2006-01-17 12:00 UTC Modified: 2006-01-17 20:57 UTC
From: php at koterov dot ru Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.1.2 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at koterov dot ru
New email:
PHP Version: OS:

 

 [2006-01-17 12:00 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-17 20:57 UTC] iliaa@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 08:02:42 2024 UTC