summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-21 19:10:43 -0700
committerBrion Vibber <brion@pobox.com>2010-10-21 19:10:43 -0700
commitd6f4588b9ede2cb26b06084b3117ec9184f9e64e (patch)
tree91ff85fcf9caa913a6b026e7a5dd0998f5dd09f0
parent131c339c5ab61196fc0628b313221431e2fe421c (diff)
Workaround for http_build_query() oddities in low-level router parent code when PHP config is set with non-default separator.
-rw-r--r--lib/router.php9
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 &amp; instead of &. Encoded &s in parameters will not be
+ // affected.
+ $url = substr($url, 0, $qpos+1) .
+ str_replace('&amp;', '&', substr($url, $qpos+1));
+
}
+
return $url;
}
}