Stop router from processing routes if no valid route is found.

This commit is contained in:
Simon Sessingo
2018-02-27 00:12:45 +01:00
parent b8d5106f4e
commit b051bcf02b
+5
View File
@@ -48,6 +48,11 @@ class SimpleRouter
*/
public static function start()
{
// Stop processing routes if no valid route is found.
if(static::request()->getUrl()->getPath() === null) {
return;
}
echo static::router()->routeRequest();
}