1
0
Fork 0

app/Models/Word.php: in getRandom() should be greater than zero when checking $exclude array.

This commit is contained in:
Henrik Hautakoski 2021-03-21 08:31:05 +01:00
parent f26da7567a
commit d5572bfdc5

View file

@ -44,7 +44,8 @@ class Word extends Model
if (!is_array($exclude)) {
$exclude = [ $exclude ];
}
if (count($exclude) > 1) {
if (count($exclude) > 0) {
$q->where("uuid", 'NOT IN', $exclude);
}
return $q->first();