Edit report at https://bugs.php.net/bug.php?id=63512&edit=1

 ID:                 63512
 Comment by:         arjen at react dot com
 Reported by:        arjen at react dot com
 Summary:            parse_ini_file() with INI_SCANNER_RAW removes quotes
                     from value.
 Status:             Assigned
 Type:               Bug
 Package:            Filesystem function related
 Operating System:   All
 PHP Version:        5.3.18
 Assigned To:        laruence
 Block user comment: N
 Private report:     N

 New Comment:

With this patch, the old behaviour is restored. But the "eat leading and 
trailing quotes" does 
not make sense..

var_dump(parse_ini_string('waa = "string" CONSTANT "anotherString"', false, 
INI_SCANNER_RAW));

5.3.18 (wrong):
array(1) {
  ["waa"]=>
  string(29) "string CONSTANT anotherString"
}

with patch (behaviour like in versions < 5.3.15)

array(1) {
  ["waa"]=>
  string(29) "string" CONSTANT "anotherString"
}


Now string appears to be the constant, and CONSTANT a quoted string..

expected/better:
array(1) {
  ["waa"]=>
  string(29) ""string" CONSTANT "anotherString""
}

So IHMO remove this whole trim quotes thingy.


Previous Comments:
------------------------------------------------------------------------
[2012-11-15 04:46:29] pierr...@php.net

The following patch has been added/updated:

Patch Name: 63512-v3.diff
Revision:   1352954789
URL:        
https://bugs.php.net/patch-display.php?bug=63512&patch=63512-v3.diff&revision=1352954789

------------------------------------------------------------------------
[2012-11-15 04:45:54] pierr...@php.net

I created a patch for this bug (which also fix #62884).

Could you make a quick code review before I commit it ? 

Thanks

------------------------------------------------------------------------
[2012-11-15 04:12:53] pierr...@php.net

The following patch has been added/updated:

Patch Name: 63512-v2.diff
Revision:   1352952773
URL:        
https://bugs.php.net/patch-display.php?bug=63512&patch=63512-v2.diff&revision=1352952773

------------------------------------------------------------------------
[2012-11-14 15:19:00] larue...@php.net

pierrick, do you have time to look at this? thanks :)

------------------------------------------------------------------------
[2012-11-14 12:14:29] arjen at react dot com

Warning: expected result and actual result are swapped! :o

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=63512


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

Reply via email to