diff --git a/module/Core/src/Tag/Model/OrderableField.php b/module/Core/src/Tag/Model/OrderableField.php index eb802a7f..818099de 100644 --- a/module/Core/src/Tag/Model/OrderableField.php +++ b/module/Core/src/Tag/Model/OrderableField.php @@ -23,7 +23,7 @@ enum OrderableField: string public static function toSnakeCaseValidField(?string $field): string { - $parsed = self::tryFrom($field); + $parsed = $field !== null ? self::tryFrom($field) : self::VISITS; $normalized = match ($parsed) { self::VISITS_COUNT, null => self::VISITS, default => $parsed,