Avoid array_intersect error if argv is not defined (#4751)
Credit to @ChVuagniaux. Can be triggered when attempting to run Laravel HTTP tests on OctoberCMS (https://laravel.com/docs/6.x/http-tests)
This commit is contained in:
parent
615c4cdb04
commit
f0db465f46
|
|
@ -153,7 +153,7 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
/*
|
||||
* CLI
|
||||
*/
|
||||
if (App::runningInConsole() && count(array_intersect($commands, Request::server('argv'))) > 0) {
|
||||
if (App::runningInConsole() && count(array_intersect($commands, Request::server('argv', []))) > 0) {
|
||||
PluginManager::$noInit = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue