From ee300c73c770d4030e3822022546393337ab50fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Proch=C3=A1zka?= Date: Sat, 29 Aug 2020 22:13:31 +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 ac72bbe9..26320590 100644 --- a/src/DataGrid.php +++ b/src/DataGrid.php @@ -852,6 +852,10 @@ protected function createSorting(array $sort, callable $sort_callback = null) foreach ($sort as $key => $order) { unset($sort[$key]); + if ($order !== 'ASC' && $order !== 'DESC') { + continue; + } + try { $column = $this->getColumn($key);