Skip to content

Commit

Permalink
handleShowColumn crash when all columns are shown (#1152)
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 Nov 14, 2024
1 parent 04f0e4b commit bec1452
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 bec1452

Please sign in to comment.