Skip to content

Commit

Permalink
Fix type error when idSites isn't an array
Browse files Browse the repository at this point in the history
  • Loading branch information
snake14 committed Oct 11, 2024
1 parent 15d2bf5 commit c70e573
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/Archive/ArchiveInvalidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit c70e573

Please sign in to comment.