mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-07 07:43:12 +08:00
Fixed missing null check
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user