php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54057 INI_SCANNER_RAW and parse_ini_file still doesnt return proper values
Submitted: 2011-02-21 02:55 UTC Modified: 2011-11-15 23:46 UTC
From: electroteque at gmail dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5.3.5 OS: OSX 10.6
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: electroteque at gmail dot com
New email:
PHP Version: OS:

 

 [2011-02-21 02:55 UTC] electroteque at gmail dot com
Description:
------------
An ini config with values like

package.prop1 = true
package.prop2 = 100

Are supposed to be returned as boolean and numbers but are not. 

This is a bit of an oversight perhaps ? 

Your bug system is also buggy, I clicked submit it tried to bring up a list of bug 
reports, and it removes the package affected selection and the captcha has to be 
put back in. 

Test script:
---------------
$iniArray = parse_ini_file($filename, true, INI_SCANNER_RAW);

Expected result:
----------------
array(1) {
  ["package"]=>
  array(2) {
    ["prop1"]=>
    bool(true)
    ["prop2"]=>
    int(100)
  }
}

Actual result:
--------------
array(2) {
  ["prop1"]=>
  string(4) "true"
  ["prop2"]=>
  string(3) "100"
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-15 23:46 UTC] felipe@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

To reach what you want, you need to use:

package[prop1] = true
package[prop2] = 100
 [2011-11-15 23:46 UTC] felipe@php.net
-Status: Open +Status: Bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 10:01:28 2024 UTC