mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-29 21:12:36 +03:00
Fixed missing null check
This commit is contained in:
parent
fc0aba6311
commit
46b4a21617
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ enum OrderableField: string
|
||||||
|
|
||||||
public static function toSnakeCaseValidField(?string $field): string
|
public static function toSnakeCaseValidField(?string $field): string
|
||||||
{
|
{
|
||||||
$parsed = self::tryFrom($field);
|
$parsed = $field !== null ? self::tryFrom($field) : self::VISITS;
|
||||||
$normalized = match ($parsed) {
|
$normalized = match ($parsed) {
|
||||||
self::VISITS_COUNT, null => self::VISITS,
|
self::VISITS_COUNT, null => self::VISITS,
|
||||||
default => $parsed,
|
default => $parsed,
|
||||||
|
|
Loading…
Add table
Reference in a new issue