Skip to content

Commit 223fbfc

Browse files
author
voyula
authored
fixed any method problem
1 parent 651a6d6 commit 223fbfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MiladRahimi/PHPRouter/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ public function get($routes = null, $controller = null, $middleware = null) {
366366
* @param callable|string|null $middleware
367367
*/
368368
public function map($methods, $routes, $controller, $middleware = null) {
369-
if (!isset($methods)) {
369+
if ($methods !== null && !isset($methods)) {
370370
throw new InvalidArgumentException("Methods must be set");
371371
}
372372
if (!isset($routes)) {

0 commit comments

Comments
 (0)