Skip to content

Commit ef9032c

Browse files
authored
Merge pull request #11 from voyula/patch-1
fixed any method problem
2 parents 651a6d6 + 223fbfc commit ef9032c

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)