diff --git a/core/Archive/ArchiveInvalidator.php b/core/Archive/ArchiveInvalidator.php index 2ae18733091..ecf06f38b1a 100644 --- a/core/Archive/ArchiveInvalidator.php +++ b/core/Archive/ArchiveInvalidator.php @@ -654,6 +654,10 @@ public function removeInvalidationsFromDistributedList($idSites, $pluginName = n $list = new ReArchiveList(); $entries = $list->getAll(); + // Make sure that idSites is an array or all before using it + $idSites = $idSites === 0 || $idSites === '0' || $idSites == 'all' + ? 'all' : (is_array($idSites) ? $idSites : [$idSites]); + if ($idSites === 'all') { $idSites = $this->getAllSitesId(); }