From 223fbfc4d22e23560428b46f5d2adfad1122a726 Mon Sep 17 00:00:00 2001 From: voyula <40173603+voyula@users.noreply.github.com> Date: Mon, 16 Jul 2018 05:28:12 +0300 Subject: [PATCH] fixed any method problem --- src/MiladRahimi/PHPRouter/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MiladRahimi/PHPRouter/Router.php b/src/MiladRahimi/PHPRouter/Router.php index 14d1ee3..f8ce3b5 100644 --- a/src/MiladRahimi/PHPRouter/Router.php +++ b/src/MiladRahimi/PHPRouter/Router.php @@ -366,7 +366,7 @@ public function get($routes = null, $controller = null, $middleware = null) { * @param callable|string|null $middleware */ public function map($methods, $routes, $controller, $middleware = null) { - if (!isset($methods)) { + if ($methods !== null && !isset($methods)) { throw new InvalidArgumentException("Methods must be set"); } if (!isset($routes)) {