From 6b999019bdbc7511b49e4b925ccd14f6889da8dc Mon Sep 17 00:00:00 2001 From: jiriermis <46221089+jiriermis@users.noreply.github.com> Date: Tue, 22 Oct 2024 13:18:01 +0200 Subject: [PATCH] handleShowColumn crash when all columns are shown array_search(): Argument #2 ($haystack) must be of type array, null given --- src/Datagrid.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Datagrid.php b/src/Datagrid.php index 4dfe848a..e3b2300d 100644 --- a/src/Datagrid.php +++ b/src/Datagrid.php @@ -2046,7 +2046,7 @@ public function handleShowColumn(string $column): void { $columns = $this->getSessionData('_grid_hidden_columns'); - if ($columns !== []) { + if ($columns !== [] && $columns !== null) { $pos = array_search($column, $columns, true); if ($pos !== false) {