From 19a6be2e5d3fb25449c973360938ae6711113e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Postler?= Date: Tue, 20 Jun 2023 13:57:27 +0200 Subject: [PATCH] Update Dataset.php --- src/UI/Dataset/Dataset.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UI/Dataset/Dataset.php b/src/UI/Dataset/Dataset.php index 6944e63..1a1d1a9 100644 --- a/src/UI/Dataset/Dataset.php +++ b/src/UI/Dataset/Dataset.php @@ -495,7 +495,7 @@ private function sort(ICollection $c): ICollection $column = $this->columns[$sort]; $direction = $this->getComponent('sorting')->direction; if ($column->sort->function) { - $c = $c->orderBy(array_merge([$column->sort->function->class], $column->sort->function->args), $direction); + $c = $c->orderBy(array_merge([$column->sort->function->class], (array) $column->sort->function->args), $direction); } else { $c = $c->orderBy($column->getNextrasName(), $direction); } @@ -505,7 +505,7 @@ private function sort(ICollection $c): ICollection continue; } if ($column->sort->function) { - $c = $c->orderBy(array_merge([$column->sort->function->class], $column->sort->function->args), $column->sort->direction); + $c = $c->orderBy(array_merge([$column->sort->function->class], (array) $column->sort->function->args), $column->sort->direction); } else { $c = $c->orderBy($column->getNextrasName(), $column->sort->direction); }