PHP Warning: array_rand(): Array is empty
-
Hi Jeff!
In lib/HoneypotToolkit.class.php on line 129
$positions
is an empty array if all honeypot positions are unchecked andarray_rand()
complains about an empty array.Adding
if (empty($positions)) { return; }
before
$positionKey = array_rand($positions, 1);
would fix that issue.Best,
Marian
- The topic ‘PHP Warning: array_rand(): Array is empty’ is closed to new replies.