generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Description
$currentOrder can be set to default value after normalizing config.
Lines 114 to 126 in 15ddd6e
| $normalizedConfig[$fieldName] = array_merge( | |
| [ | |
| 'asc' => [$fieldName => SORT_ASC], | |
| 'desc' => [$fieldName => SORT_DESC], | |
| 'default' => 'asc', | |
| ], | |
| $fieldConfig, | |
| ); | |
| } | |
| /** @psalm-var TConfig $normalizedConfig */ | |
| $this->config = $normalizedConfig; | |
| } |
This will help avoid an exception if $currentOrder is not set manually.
data/src/Paginator/KeysetPaginator.php
Lines 444 to 446 in 15ddd6e
| if (empty($sort->getOrder())) { | |
| throw new InvalidArgumentException('Data should be always sorted to work with keyset pagination.'); | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels