diff options
Diffstat (limited to 'core/Archive.php')
-rw-r--r-- | core/Archive.php | 5 |
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)) { |