From 649ed28a9142a087f0ea09e206df6b818f5172b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Fri, 30 Oct 2015 02:27:44 +0100 Subject: [PATCH] [BUGFIX] Fixed Exceptions due to route null value. --- src/Pecee/SimpleRouter/RouterBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pecee/SimpleRouter/RouterBase.php b/src/Pecee/SimpleRouter/RouterBase.php index 76b6cb8..900d1a4 100644 --- a/src/Pecee/SimpleRouter/RouterBase.php +++ b/src/Pecee/SimpleRouter/RouterBase.php @@ -253,7 +253,7 @@ class RouterBase { throw new \InvalidArgumentException('Invalid type for getParams. Must be array or null'); } - if($controller === null && $parameters === null) { + if($controller === null && $parameters === null && $this->loadedRoute !== null) { return $this->processUrl($this->loadedRoute, null, $getParams); } @@ -295,7 +295,7 @@ class RouterBase { $method = $tmp[1]; } - if($controller === $c) { + if($controller === $c && $route !== null) { return $this->processUrl($route, $method, $parameters, $getParams); } }