implode() deprecated usage
michelebruno opened this issue · 1 comments
michelebruno commented
Summary
On PHP 7.4.x, implode( $pieces , $glue )
is deprecated and should be swapped to implode( $glue , $pieces )
. I have this probleme on fzaninotto\faker\src\Faker\Provider\Lorem.php:196
but it could be on other scripts.
Versions
Version | |
---|---|
PHP | 7.4.1 |
fzaninotto/faker |
1.8.0 |
Actual output
ErrorException : implode(): Passing glue string after array is deprecated. Swap the parameters
at D:\localhost\booking\vendor\fzaninotto\faker\src\Faker\Provider\Lorem.php:196
192| // end sentence with full stop
193| $text[count($text) - 1] .= '.';
194| }
195|
> 196| return implode($text, '');
197| }
198|
199| protected static function randomizeNbElements($nbElements)
Exception trace:
1 implode("")
D:\localhost\booking\vendor\fzaninotto\faker\src\Faker\Provider\Lorem.php:196
2 Faker\Provider\Lorem::text()
D:\localhost\booking\vendor\fzaninotto\faker\src\Faker\Generator.php:222
pimjansen commented
This is correct, please update your faker version to 1.9.1 to resolve