Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-08-18 14:13:22 +0300
committersgiehl <stefan@piwik.org>2015-10-06 17:23:56 +0300
commit0d1d7a69d976a1586bdfe662ed07165be8eff8c7 (patch)
treefbf9af791bb794427743154b14074570d18145d1
parenta8e85cb5e806dc1aec4fcbe4b9674ae3c3740ab2 (diff)
fix unit test as it fails if $columnToSort is null
-rw-r--r--core/Metrics/Sorter.php2
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);