mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
fixed comparisons for score parameter ingestion
This commit is contained in:
parent
c5d17a52cf
commit
cb3c46b6f9
@ -111,21 +111,21 @@ abstract class MediaSearchQueryBuilder extends SearchQueryBuilder
|
||||
->where('status', $status);
|
||||
}
|
||||
|
||||
if ($score !== 0) {
|
||||
if (!is_null($score)) {
|
||||
$score = (float)$score;
|
||||
|
||||
$builder = $builder
|
||||
->where('score', '>=', $score);
|
||||
}
|
||||
|
||||
if ($min_score !== null) {
|
||||
if (!is_null($min_score)) {
|
||||
$min_score = (float)$min_score;
|
||||
|
||||
$builder = $builder
|
||||
->where('score', '>=', $min_score);
|
||||
}
|
||||
|
||||
if ($max_score !== null) {
|
||||
if (!is_null($max_score)) {
|
||||
$max_score = (float)$max_score;
|
||||
|
||||
$builder = $builder
|
||||
|
Loading…
x
Reference in New Issue
Block a user