mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 10:10:49 -04:00
Fix exception getCode type
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
parent
3a11128e6c
commit
53e408f76a
1 changed files with 2 additions and 2 deletions
|
|
@ -1271,7 +1271,7 @@ class ShareAPIController extends OCSController {
|
|||
$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);
|
||||
}
|
||||
|
|
@ -1353,7 +1353,7 @@ class ShareAPIController extends OCSController {
|
|||
$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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue