summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller/ShareAPIController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareAPIController.php')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index b810a515082..bc525b6ef82 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -669,13 +669,14 @@ class ShareAPIController extends OCSController {
throw new OCSNotFoundException($this->l->t('Wrong share ID, share doesn\'t exist'));
}
+ if ($permissions === null && $password === null && $publicUpload === null && $expireDate === null) {
+ throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given'));
+ }
+
/*
* expirationdate, password and publicUpload only make sense for link shares
*/
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) {
- if ($permissions === null && $password === null && $publicUpload === null && $expireDate === null) {
- throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given'));
- }
$newPermissions = null;
if ($publicUpload === 'true') {