|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-04-01 19:27 UTC] mike@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: mike
[2012-04-01 19:27 UTC] mike@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
Description: ------------ HttpQueryString class translates '.' in params to '_' This behavior (which is obviously being copied from parse_str) makes sense when parse_str copies parameter names into the global variable scope, but it is *invalid behavior*. "." is a completely acceptable character for parameter names to include. A "next generation" module shouldn't copy the bad behaviors of the function it's replacing. Test script: --------------- $query = 'bar.baz=blah&utm_source=google&utm_campaign=somethingelse&blat'; $foo = new HttpQueryString(false, $query); print_r($foo->toArray()); echo $foo->toString(); Expected result: ---------------- Array ( [bar.baz] => blah [utm_source] => google [utm_campaign] => somethingelse [blat] => ) bar.baz=blah&utm_source=google&utm_campaign=somethingelse&blat= Actual result: -------------- Array ( [bar_baz] => blah [utm_source] => google [utm_campaign] => somethingelse [blat] => ) bar_baz=blah&utm_source=google&utm_campaign=somethingelse&blat=