Skip to content

Commit

Permalink
Merge pull request #5986 from WoltLab/bugfix/empty-update-server-xml
Browse files Browse the repository at this point in the history
Check whether the server response is empty and throw an exception
  • Loading branch information
Cyperghost authored Sep 3, 2024
2 parents 1141006 + 0b56c50 commit 3e935a1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ private function getPackageUpdateXML(PackageUpdateServer $updateServer)
// parse given package update xml
$allNewPackages = false;
if ($apiVersion === '2.0' || $response->getStatusCode() != 304) {
if (!$response->getBody()->getSize()) {
throw new SystemException(WCF::getLanguage()->get('wcf.acp.package.update.error.listNotFound'));
}

$allNewPackages = $this->parsePackageUpdateXML($updateServer, $response->getBody(), $apiVersion);
}

Expand Down

0 comments on commit 3e935a1

Please sign in to comment.