diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-12-10 04:34:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-10 04:34:01 +0300 |
commit | ff966d131c49f6d9ca04438dcbd74a3a1f4013e1 (patch) | |
tree | e1a08738221d76a645ad50eb241b7dd01dee3bbb /plugins/Referrers | |
parent | 848d1a258b085cad5b7725e630b1303f4c8e3a21 (diff) |
Use correct method to check row count (#16921)
Diffstat (limited to 'plugins/Referrers')
-rw-r--r-- | plugins/Referrers/API.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Referrers/API.php b/plugins/Referrers/API.php index d5e2f33a65..f4bc28bc94 100644 --- a/plugins/Referrers/API.php +++ b/plugins/Referrers/API.php @@ -752,14 +752,14 @@ class API extends \Piwik\Plugin\API $table->setAllTableMetadata($numericArchives->getAllTableMetadata()); - if ($table->getRows() == 0) { - $table->addRow(new DataTable\Row()); - } - if ($numericArchives->getRowsCount() == 0) { return; } + if ($table->getRowsCountWithoutSummaryRow() == 0) { + $table->addRow(new DataTable\Row()); + } + $row = $table->getFirstRow(); foreach ($numericArchives->getFirstRow() as $name => $value) { $row->setColumn($name, $value); |