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:
parent
c9e2957c23
commit
e8c781ba94
1 changed files with 1 additions and 0 deletions
|
@ -114,6 +114,7 @@ class LoremIpsum
|
||||||
*/
|
*/
|
||||||
public function words($count = 1, $tags = false, $array = false)
|
public function words($count = 1, $tags = false, $array = false)
|
||||||
{
|
{
|
||||||
|
$count = (int) $count;
|
||||||
$words = array();
|
$words = array();
|
||||||
$word_count = 0;
|
$word_count = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue