Skip to content
Snippets Groups Projects
Commit 77e6278d authored by Robin Appelman's avatar Robin Appelman
Browse files

Preserve keys when sorting parameters when generatings urls

parent b95aa43a
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment