diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-14 11:02:26 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2014-08-14 11:19:26 +0400 |
commit | 5cf69a0b75e0041e7373a18e21e7d640edbb69ec (patch) | |
tree | 76ede142c3b229099b8667293bff076b2cde2bde /core/DataTable/Filter/ColumnDelete.php | |
parent | a040cb98cccb95ebe241465ad3cab1f0925d9e78 (diff) |
wondering if this fixes the skipped test?
Diffstat (limited to 'core/DataTable/Filter/ColumnDelete.php')
-rw-r--r-- | core/DataTable/Filter/ColumnDelete.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/DataTable/Filter/ColumnDelete.php b/core/DataTable/Filter/ColumnDelete.php index 532cd5c644..5aac6d44a6 100644 --- a/core/DataTable/Filter/ColumnDelete.php +++ b/core/DataTable/Filter/ColumnDelete.php @@ -100,7 +100,7 @@ class ColumnDelete extends BaseFilter // remove columns specified in $this->columnsToRemove if (!empty($this->columnsToRemove)) { - foreach ($table as &$row) { + foreach ($table as $index => $row) { foreach ($this->columnsToRemove as $column) { if ($this->deleteIfZeroOnly) { $value = $row[$column]; @@ -109,7 +109,7 @@ class ColumnDelete extends BaseFilter } } - unset($row[$column]); + unset($table[$index][$column]); } } @@ -118,7 +118,7 @@ class ColumnDelete extends BaseFilter // remove columns not specified in $columnsToKeep if (!empty($this->columnsToKeep)) { - foreach ($table as &$row) { + foreach ($table as $index => $row) { foreach ($row as $name => $value) { $keep = false; @@ -133,7 +133,7 @@ class ColumnDelete extends BaseFilter && $name != 'label' // label cannot be removed via whitelisting && !isset($this->columnsToKeep[$name]) ) { - unset($row[$name]); + unset($table[$index][$name]); } } } |