diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-10-17 12:36:50 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-10-17 12:36:50 +0200 |
commit | 53e408f76aecf20b68b48d373ae000bd7c3f5e88 (patch) | |
tree | 948db5e70f62689d0bab05f2c037fbb45e7a5405 /apps/files_sharing/lib/Controller | |
parent | 3a11128e6c46cc6e9aafe41812889ae032c1be46 (diff) | |
download | nextcloud-server-53e408f76aecf20b68b48d373ae000bd7c3f5e88.tar.gz nextcloud-server-53e408f76aecf20b68b48d373ae000bd7c3f5e88.zip |
Fix exception getCode type
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files_sharing/lib/Controller')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 1212414790c..0a876e98912 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -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); } |