|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52508 newline problem with parse_ini_file+INI_SCANNER_RAW
Submitted: 2010-08-01 00:44 UTC Modified: 2010-08-01 17:27 UTC
From: tyra3l at gmail dot com Assigned: felipe (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3.3 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tyra3l at gmail dot com
New email:
PHP Version: OS:


 [2010-08-01 00:44 UTC] tyra3l at gmail dot com
If I set the third parameter of the parse_ini_file function to INI_SCANNER_RAW, 
then the ini file has to end with a newline, else it will trigger a "syntax error, 
unexpected $end" warning.
The same ini file works with the default scanner_mode(INI_SCANNER_NORMAL), so I 
think this is a bug.

Test script:
$ini_array = parse_ini_file("test.ini", true, INI_SCANNER_RAW);

Expected result:
no warning

Actual result:
Warning: syntax error, unexpected $end ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-01 17:26 UTC]
Automatic comment from SVN on behalf of felipe
Log: - Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW)
 [2010-08-01 17:27 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2010-08-01 17:27 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
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 Jul 18 21:01:27 2024 UTC