Preserve keys when sorting parameters when generatings urls

This commit is contained in:
Robin Appelman 2014-04-29 11:55:19 +02:00
parent b95aa43a5d
commit 77e6278d09

View File

@ -31,7 +31,7 @@ class CachingRouter extends Router {
* @return string
*/
public function generate($name, $parameters = array(), $absolute = false) {
sort($parameters);
asort($parameters);
$key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . json_encode($parameters) . intval($absolute);
if ($this->cache->hasKey($key)) {
return $this->cache->get($key);