ID:               48769
 Updated by:       j...@php.net
 Reported By:      ahar...@php.net
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Linux x86
 PHP Version:      5.3CVS-2009-07-02 (CVS)
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

The issue is same as in bug #48768


Previous Comments:
------------------------------------------------------------------------

[2009-07-02 07:12:02] ahar...@php.net

Description:
------------
In addition to bug 48768, which is a parse_ini_file() crasher when
INI_SCANNER_RAW mode is used, there's also an issue with configuration
items containing equal signs in general which results in a (seemingly)
spurious warning.

Given that INI_SCANNER_RAW is new and only minimally documented, this
may in fact be intended behaviour, in which case this should probably be
changed to a documentation problem. It would seem odd that changing the
scanner mode would prevent properly double-quoted configuration values
from being parsed, though.

Reproduce code:
---------------
INI file:

equal = "foo=bar"


PHP script:

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_NORMAL);
var_dump($ini);

$ini = parse_ini_file('equals.ini', false, INI_SCANNER_RAW);
var_dump($ini);


Expected result:
----------------
array(1) {
  ["equal"]=>
  string(7) "foo=bar"
}
array(1) {
  ["equal"]=>
  string(7) "foo=bar"
}


Actual result:
--------------
array(1) {
  ["equal"]=>
  string(7) "foo=bar"
}

Warning: syntax error, unexpected '"' in equals.ini on line 1
 in /tmp/equals.php on line 5

Call Stack:
    0.0007     324132   1. {main}() /tmp/equals.php:0
    0.0012     324544   2. parse_ini_file() /tmp/equals.php:5



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48769&edit=1

Reply via email to