Workaround for http_build_query() oddities in low-level router parent code when PHP config is set with non-default separator.

This commit is contained in:
Brion Vibber 2010-10-21 19:10:43 -07:00
parent 131c339c5a
commit d6f4588b9e

View File

@ -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;
}
}