aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Route
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Route')
-rw-r--r--lib/private/Route/CachingRouter.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Route/CachingRouter.php b/lib/private/Route/CachingRouter.php
index cb1b98d77e6..a37bbf5b701 100644
--- a/lib/private/Route/CachingRouter.php
+++ b/lib/private/Route/CachingRouter.php
@@ -58,7 +58,9 @@ class CachingRouter extends Router {
return $cachedKey;
} else {
$url = parent::generate($name, $parameters, $absolute);
- $this->cache->set($key, $url, 3600);
+ if ($url) {
+ $this->cache->set($key, $url, 3600);
+ }
return $url;
}
}