mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-11 02:30:05 +03:00
Added last check on ShortUrlsOrdering which makes sure everything keeps behaving as it used to
This commit is contained in:
parent
452bfea088
commit
fccd92497a
2 changed files with 6 additions and 1 deletions
|
@ -60,4 +60,9 @@ final class ShortUrlsOrdering
|
|||
{
|
||||
return $this->orderDirection;
|
||||
}
|
||||
|
||||
public function hasOrderField(): bool
|
||||
{
|
||||
return $this->orderField !== null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class ShortUrlRepository extends EntityRepository implements ShortUrlRepositoryI
|
|||
}
|
||||
|
||||
// In case the ordering has been specified, the query could be more complex. Process it
|
||||
if ($orderBy !== null) {
|
||||
if ($orderBy !== null && $orderBy->hasOrderField()) {
|
||||
return $this->processOrderByForList($qb, $orderBy);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue