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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2018 The PHP Group
All rights reserved.
Last updated: Wed Sep 19 05:01:26 2018 UTC