diff options
author | Brion Vibber <brion@pobox.com> | 2010-10-21 19:10:43 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-10-21 19:10:43 -0700 |
commit | d6f4588b9ede2cb26b06084b3117ec9184f9e64e (patch) | |
tree | 91ff85fcf9caa913a6b026e7a5dd0998f5dd09f0 /lib/router.php | |
parent | 131c339c5ab61196fc0628b313221431e2fe421c (diff) |
Workaround for http_build_query() oddities in low-level router parent code when PHP config is set with non-default separator.
Diffstat (limited to 'lib/router.php')
-rw-r--r-- | lib/router.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/router.php b/lib/router.php index 417206e6b..ab8c40668 100644 --- a/lib/router.php +++ b/lib/router.php @@ -863,7 +863,16 @@ class Router if ($qpos !== false) { $url = substr($url, 0, $qpos+1) . str_replace('?', '&', substr($url, $qpos+1)); + + // @fixme this is a hacky workaround for http_build_query in the + // lower-level code and bad configs that set the default separator + // to & instead of &. Encoded &s in parameters will not be + // affected. + $url = substr($url, 0, $qpos+1) . + str_replace('&', '&', substr($url, $qpos+1)); + } + return $url; } } |