Stopped Executing the likes of this command like php artisan migrate
Kindly help me to resolve this issue I cannot issue any command like php artisan migrate
It is throwing error -
In Application.php line 598: strpos() expects parameter 1 to be string, array given
[2020-09-22 16:45:52] local.ERROR: strpos() expects parameter 1 to be string, array given {"exception":"[object] (ErrorException(code: 0): strpos() expects parameter 1 to be string, array given at ~/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:598) [stacktrace] #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'strpos() expect...', '/Users/bayo/Amp...', 598, Array) #1 ~/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(598): strpos(Array, 'Illuminate\') #2 ~/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(425): Illuminate\Foundation\Application->Illuminate\Foundation{closure}(Array, 'aliases') #3 ~/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(599): Illuminate\Support\Collection->partition('aliases') #4 ~/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\Foundation\Application->registerConfiguredProviders() #5 ~/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(230): Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap(Object(Illuminate\Foundation\Application)) #6 ~/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith(Array) #7 ~/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(127): Illuminate\Foundation\Console\Kernel->bootstrap() #8 ~/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #9 {main} "}
Can you be any chance see the full path here?
handleError(2, 'strpos() expect...', '/Users/bayo/Amp...', 598, Array) #1
Or is any of your own files listed in the error. I assume you have an error in your code but without seeing the code it is hard to fix
Did you add some of your own code into the service providers? Check them first.
Hello, Thank you.
The path/Directory is showing and referencing the application.php file and the line 598
The error is on line - return strpos($provider, 'Illuminate\') === 0;
public function registerConfiguredProviders()
{
$providers = Collection::make($this->config['app.providers'])
->partition(function ($provider) {
return strpos($provider, 'Illuminate\') === 0;
});
Kindly Assist
Seems that you have registered a service provider that isnt a string?
Please show the content of your config/app.php file
Add ``` on the line before the code to format it properly
Thank you for your help and guide in resolving the missed steps, resolved. I reconfigured the config/app.php with default file.
Please or to participate in this conversation.