From d6f4588b9ede2cb26b06084b3117ec9184f9e64e Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 21 Oct 2010 19:10:43 -0700 Subject: [PATCH] Workaround for http_build_query() oddities in low-level router parent code when PHP config is set with non-default separator. --- lib/router.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/router.php b/lib/router.php index 417206e6bf..ab8c40668d 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; } } -- 2.39.5