From d1c3b439a45761504986a9f8cd8514eba5f1b4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Proch=C3=A1zka?= Date: Sat, 29 Aug 2020 22:06:19 +0200 Subject: [PATCH] Sorting wont use anything but ASC/DESC strings; Closes #914 --- src/DataGrid.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/DataGrid.php b/src/DataGrid.php index 9c3755ca..04540af1 100644 --- a/src/DataGrid.php +++ b/src/DataGrid.php @@ -824,6 +824,10 @@ protected function createSorting(array $sort, ?callable $sortCallback = null): S foreach ($sort as $key => $order) { unset($sort[$key]); + if ($order !== 'ASC' && $order !== 'DESC') { + continue; + } + try { $column = $this->getColumn($key);