app/Models/Word.php: in getRandom() should be greater than zero when checking $exclude array.
This commit is contained in:
parent
f26da7567a
commit
d5572bfdc5
1 changed files with 2 additions and 1 deletions
|
|
@ -44,7 +44,8 @@ class Word extends Model
|
||||||
if (!is_array($exclude)) {
|
if (!is_array($exclude)) {
|
||||||
$exclude = [ $exclude ];
|
$exclude = [ $exclude ];
|
||||||
}
|
}
|
||||||
if (count($exclude) > 1) {
|
|
||||||
|
if (count($exclude) > 0) {
|
||||||
$q->where("uuid", 'NOT IN', $exclude);
|
$q->where("uuid", 'NOT IN', $exclude);
|
||||||
}
|
}
|
||||||
return $q->first();
|
return $q->first();
|
||||||
|
|
|
||||||
Reference in a new issue