From: Robin Appelman Date: Tue, 15 Apr 2014 13:48:02 +0000 (+0200) Subject: Sort parameters and cast to int X-Git-Tag: v7.0.0alpha2~395^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7f77b08098426801bfede696a88671efc1f82d83;p=nextcloud-server.git Sort parameters and cast to int --- 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 {