php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68461 parse_ini_file not parsing conf file if it has line like "on="
Submitted: 2014-11-20 12:42 UTC Modified: 2018-08-20 21:56 UTC
From: sandeep dot singh dot bisht at gmail dot com Assigned:
Status: Open Package: Filesystem function related
PHP Version: 5.5.19 OS: Ubuntu
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sandeep dot singh dot bisht at gmail dot com
New email:
PHP Version: OS:

 

 [2014-11-20 12:42 UTC] sandeep dot singh dot bisht at gmail dot com
Description:
------------
If conf file have something like 
on=

Then it throws warning

php: PHP Warning:  syntax error, unexpected BOOL_TRUE in test.conf on line 4#012 in /tmp/test.php on line 2

Test script:
---------------
$ cat test.conf
[data]
test=test
abc=abc
on=test


$ cat test.php
<?php
$conf=parse_ini_file("test.conf",true);
print_r($conf);
?>

$php test.php

Not printing anything.But getting this warning

php: PHP Warning:  syntax error, unexpected BOOL_TRUE in test.conf on line 4#012 in /tmp/test.php on line 2


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-20 17:16 UTC] requinix@php.net
See also bug #68347, though I don't think it can be reasonably argued that this version is not a bug either.
 [2018-08-20 21:56 UTC] cmb@php.net
-Package: Filter related +Package: Filesystem function related
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 13 20:01:23 2019 UTC