PHP 8.1: Implicit incompatible float to int conversion is deprecated

In PHP 8.1 floats are not implicitly converted to integers as before. 
The array_slice on line 139 requires an integer as the third parameter (the $count variable) so added line 117 to do the conversion of $count.
This commit is contained in:
Roy Verrips 2022-01-05 23:21:49 -06:00 committed by Josh Sherman
parent c9e2957c23
commit 63a52c853b

View file

@ -114,6 +114,7 @@ class LoremIpsum
*/
public function words($count = 1, $tags = false, $array = false)
{
$count = (int) $count;
$words = array();
$word_count = 0;