diff --git a/src/Filters/FiltersPartial.php b/src/Filters/FiltersPartial.php index cb86d6cd..f5c38385 100644 --- a/src/Filters/FiltersPartial.php +++ b/src/Filters/FiltersPartial.php @@ -25,12 +25,12 @@ public function __invoke(Builder $query, $value, string $property) $databaseDriver = $this->getDatabaseDriver($query); if (is_array($value)) { - if (count(array_filter($value, fn ($item) => empty($item))) === 0) { + if (count(array_filter($value, fn ($item) => strlen($item) > 0)) === 0) { return $query; } $query->where(function (Builder $query) use ($databaseDriver, $value, $wrappedProperty) { - foreach (array_filter($value, fn ($item) => empty($item)) as $partialValue) { + foreach (array_filter($value, fn ($item) => strlen($item) > 0) as $partialValue) { [$sql, $bindings] = $this->getWhereRawParameters($partialValue, $wrappedProperty, $databaseDriver); $query->orWhereRaw($sql, $bindings); }