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:
Diffstat (limited to 'core/Archive.php')
-rw-r--r--core/Archive.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/Archive.php b/core/Archive.php
index 38f8d63b0d..8da0747635 100644
--- a/core/Archive.php
+++ b/core/Archive.php
@@ -476,6 +476,8 @@ class Archive implements ArchiveQuery
$archiveNames = array($archiveNames);
}
+ $archiveNames = array_filter($archiveNames);
+
// apply idSubtable
if ($idSubtable !== null
&& $idSubtable !== self::ID_SUBTABLE_LOAD_ALL_SUBTABLES
@@ -493,6 +495,9 @@ class Archive implements ArchiveQuery
$result = new Archive\DataCollection(
$dataNames, $archiveDataType, $this->params->getIdSites(), $this->params->getPeriods(), $this->params->getSegment(), $defaultRow = null);
+ if (empty($dataNames)) {
+ return $result; // NOTE: note posting Archive.noArchivedData here, because there might be archive data, someone just requested nothing
+ }
$archiveIds = $this->getArchiveIds($archiveNames);
if (empty($archiveIds)) {