diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-08-18 14:13:22 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-10-06 17:23:56 +0300 |
commit | 0d1d7a69d976a1586bdfe662ed07165be8eff8c7 (patch) | |
tree | fbf9af791bb794427743154b14074570d18145d1 | |
parent | a8e85cb5e806dc1aec4fcbe4b9674ae3c3740ab2 (diff) |
fix unit test as it fails if $columnToSort is null
-rw-r--r-- | core/Metrics/Sorter.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Metrics/Sorter.php b/core/Metrics/Sorter.php index 48be5a2553..822b509d78 100644 --- a/core/Metrics/Sorter.php +++ b/core/Metrics/Sorter.php @@ -202,7 +202,7 @@ class Sorter public function getBestSortFlags(DataTable $table, $columnToSort) { // when column is label we always to sort by string or natural - if ($columnToSort !== 'label') { + if (isset($columnToSort) && $columnToSort !== 'label') { foreach ($table->getRowsWithoutSummaryRow() as $row) { $value = $row->getColumn($columnToSort); |