Fix detection of transaction type.

This commit is contained in:
James Cole
2024-02-25 18:24:10 +01:00
parent 2564470197
commit d9fba39d80
5 changed files with 8 additions and 4 deletions

View File

@@ -1095,6 +1095,10 @@ class GroupCollector implements GroupCollectorInterface
#[\Override]
public function sortCollection(Collection $collection): Collection
{
/**
* @var string $field
* @var string $direction
*/
foreach ($this->sorting as $field => $direction) {
$func = 'ASC' === $direction ? 'sortBy' : 'sortByDesc';
$collection = $collection->{$func}(function (array $product, int $key) use ($field) {