Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

join(): Argument #2 ($array) must be of type ?array, string given

So I am a beginner working on a project with symfony 5.2 project with php 8, and I have been trying to run this command

symfony console doctrine:fixtures:load

And this is the error I get :

In Lorem.php line 95: join(): Argument #2 ($array) must be of type ?array, string given

like image 808
Abdel Outaleb Avatar asked Sep 02 '25 16:09

Abdel Outaleb


1 Answers

Check the line 95 of Lorem.php, you will find:

return join($words, ' ') . '.';

change to:

return join(' ', $words) . '.';
like image 104
bas_baskara Avatar answered Sep 05 '25 05:09

bas_baskara