From 7f77b08098426801bfede696a88671efc1f82d83 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 15 Apr 2014 15:48:02 +0200 Subject: [PATCH] Sort parameters and cast to int --- lib/private/route/cachingrouter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/route/cachingrouter.php b/lib/private/route/cachingrouter.php index 766c67c73a0..6412ceb0418 100644 --- a/lib/private/route/cachingrouter.php +++ b/lib/private/route/cachingrouter.php @@ -31,7 +31,8 @@ class CachingRouter extends Router { * @return string */ public function generate($name, $parameters = array(), $absolute = false) { - $key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . json_encode($parameters) . $absolute; + sort($parameters); + $key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . json_encode($parameters) . intval($absolute); if ($this->cache->hasKey($key)) { return $this->cache->get($key); } else { -- 2.39.5