Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Bayo's avatar
Level 2

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} "}

0 likes
7 replies
Sinnbeck's avatar

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

1 like
Snapey's avatar

Did you add some of your own code into the service providers? Check them first.

Bayo's avatar
Level 2

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

Sinnbeck's avatar

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

Bayo's avatar
Level 2

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.