Apparently we can get 200 without a body back

This commit is contained in:
Christian Mollekopf 2024-03-25 13:44:00 +01:00
parent 4e0b7df3ca
commit d19de72637

View file

@ -1107,6 +1107,10 @@ class kolab_files_engine
$status = $response->getStatus();
$body = @json_decode($response->getBody(), true);
if (!$body) {
throw new Exception("Failed to get capabilities. No body returned");
}
if ($status == 200 && $body['status'] == 'OK') {
$_SESSION['kolab_files_caps'] = $body['result'];
} else {