Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.15

Bug #1558 _parseRawQuerystring() fails if arg_separator.input is more than one character
Submitted: 2004-06-04 19:16 UTC
From: php040604 at awks dot org Assigned: richard
Status: Closed Package: Net_URL
PHP Version: 4.3.6 OS: All
Roadmaps: (Not assigned)    
Subscription  


 [2004-06-04 19:16 UTC] php040604 at awks dot org
Description: ------------ Hi, according to the PHP docs, arg_separator.input can be set to a string, and any character in the string should be considered. So if it's set to "&;", either "&" or ";" is a possible separator. The fix is to put brackets around the value of arg_separator.input when creating the regex. Here is a patch: http://bnt.com/~awk/Net_URL.patch Reproduce code: --------------- require_once 'Net/URL.php'; ini_set('arg_separator.input', ';&'); $obj =& new Net_URL('http://example.com/foo?bar=1;baz=2'); print_r($obj->querystring); Expected result: ---------------- Array ( [bar] => 1 [baz] => 2 ) Actual result: -------------- Array ( [bar] => 1;baz=2 )

Comments

 [2004-06-05 14:09 UTC] richard at phpguru dot org
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/packages.php