mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 22:12:18 +00:00
Merge pull request #22 from skipperbent/development
[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');
|
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);
|
return $this->processUrl($this->loadedRoute, null, $getParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +295,7 @@ class RouterBase {
|
|||||||
$method = $tmp[1];
|
$method = $tmp[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($controller === $c) {
|
if($controller === $c && $route !== null) {
|
||||||
return $this->processUrl($route, $method, $parameters, $getParams);
|
return $this->processUrl($route, $method, $parameters, $getParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user