From ca8ea058a858eef0a8546ed14c77153c0e657cf8 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 19 Jul 2016 18:10:16 +0200 Subject: [PATCH] Bug fix for empty route --- Router/Router.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Router/Router.php b/Router/Router.php index 99db64121..064a9cd1c 100644 --- a/Router/Router.php +++ b/Router/Router.php @@ -85,6 +85,10 @@ class Router */ public function add(string $route, $destination, string $verb = RouteVerb::GET) { + if(!isset($this->routes[$route])) { + $this->routes[$route] = []; + } + $this->routes[$route][] = [ 'dest' => $destination, 'verb' => $verb,