mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-01 10:28:40 +00:00
Bug fix for empty route
This commit is contained in:
parent
c2e613ac95
commit
ca8ea058a8
|
|
@ -85,6 +85,10 @@ class Router
|
||||||
*/
|
*/
|
||||||
public function add(string $route, $destination, string $verb = RouteVerb::GET)
|
public function add(string $route, $destination, string $verb = RouteVerb::GET)
|
||||||
{
|
{
|
||||||
|
if(!isset($this->routes[$route])) {
|
||||||
|
$this->routes[$route] = [];
|
||||||
|
}
|
||||||
|
|
||||||
$this->routes[$route][] = [
|
$this->routes[$route][] = [
|
||||||
'dest' => $destination,
|
'dest' => $destination,
|
||||||
'verb' => $verb,
|
'verb' => $verb,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user