mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[BUGFIX] Fixed Exceptions due to route null value.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user