akaunting / laravel-firewall

Web Application Firewall (WAF) package for Laravel
https://akaunting.com
MIT License
941 stars 104 forks source link

Argument 2 passed to Illuminate\Routing\Router::middlewareGroup() must be of the type array, null given, called in vendor\akaunting\firewall\src\Provider.php on line 60 #30

Closed damku999 closed 4 years ago

damku999 commented 4 years ago

TypeError

Argument 2 passed to Illuminate\Routing\Router::middlewareGroup() must be of the type array, null given, called in vendor\akaunting\firewall\src\Provider.php on line 60

at vendor\laravel\framework\src\Illuminate\Routing\Router.php:879 Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 875| @param string $name 876| @param array $middleware 877| @return $this 878| /

879| public function middlewareGroup($name, array $middleware) 880| { 881| $this->middlewareGroups[$name] = $middleware; 882| 883| return $this;

1 vendor\akaunting\firewall\src\Provider.php:60 Illuminate\Routing\Router::middlewareGroup("firewall.all")

2 vendor\akaunting\firewall\src\Provider.php:33 Akaunting\Firewall\Provider::registerMiddleware(Object(Illuminate\Routing\Router))

PHP ver:7.2 LARAVEL ver 7. Server IIS

vlasscontreras commented 4 years ago

I had this problem too, so I issued #31 to fix it.

denisdulici commented 4 years ago

Feel free to follow the PR.