Skip to content

Commit

Permalink
handleShowColumn crash when all columns are shown
Browse files Browse the repository at this point in the history
array_search(): Argument #2 ($haystack) must be of type array, null given
  • Loading branch information
jiriermis authored Oct 22, 2024
1 parent 0105ca3 commit 6b99901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Datagrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6b99901

Please sign in to comment.