$share = $this->shareManager->updateShare($share);
} catch (GenericShareException $e) {
$code = $e->getCode() === 0 ? 403 : $e->getCode();
- throw new OCSException($e->getHint(), $code);
+ throw new OCSException($e->getHint(), (int)$code);
} catch (\Exception $e) {
throw new OCSBadRequestException($e->getMessage(), $e);
}
$this->shareManager->acceptShare($share, $this->currentUser);
} catch (GenericShareException $e) {
$code = $e->getCode() === 0 ? 403 : $e->getCode();
- throw new OCSException($e->getHint(), $code);
+ throw new OCSException($e->getHint(), (int)$code);
} catch (\Exception $e) {
throw new OCSBadRequestException($e->getMessage(), $e);
}