Skip to content

Commit

Permalink
PHP 7.4 warning in ColumnDelete
Browse files Browse the repository at this point in the history
fix #15210
  • Loading branch information
tsteur authored Dec 2, 2019
1 parent fb0a876 commit a99d6cb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/DataTable/Filter/ColumnDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,15 @@ protected function removeColumnsFromTable(&$table)
continue;
}
foreach ($this->columnsToRemove as $column) {

if (!array_key_exists($column, $row)) {
continue;
if (is_array($row )) {
if (!array_key_exists($column, $row)) {
continue;
}
} else {
if (!property_exists($row, $column)) {
continue;
}
}

if ($this->deleteIfZeroOnly) {
$value = $row[$column];
if ($value === false || !empty($value)) {
Expand Down

0 comments on commit a99d6cb

Please sign in to comment.