php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tyra3l at gmail dot com
New email:
PHP Version: OS:

 

 [2010-08-01 00:44 UTC] tyra3l at gmail dot com
Description:
------------
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:
---------------
<?php
$ini_array = parse_ini_file("test.ini", true, INI_SCANNER_RAW);


Expected result:
----------------
no warning

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-01 17:26 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=301758
Log: - Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW)
 [2010-08-01 17:27 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2010-08-01 17:27 UTC] felipe@php.net
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
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: Sun Oct 27 16:01:27 2024 UTC