summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-07-18 20:59:50 +0200
committerskjnldsv <skjnldsv@protonmail.com>2024-07-19 07:35:51 +0200
commit725736a754c81ccee17ba394de4da38f5bfa0e68 (patch)
tree3efb98cd93f84f15ed868f2b65c4338083994888 /apps/dav
parent481551eebf08f55e4477b8afb5c3c15b94f6ce39 (diff)
downloadnextcloud-server-725736a754c81ccee17ba394de4da38f5bfa0e68.tar.gz
nextcloud-server-725736a754c81ccee17ba394de4da38f5bfa0e68.zip
chore(integration): add file request tests
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Files/Sharing/FilesDropPlugin.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php
index b364c4ebbfc..69328d42272 100644
--- a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php
+++ b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php
@@ -62,14 +62,12 @@ class FilesDropPlugin extends ServerPlugin {
$path = array_pop($path);
// Extract the attributes for the file request
+ $isFileRequest = false;
$attributes = $this->share->getAttributes();
- if ($attributes === null) {
- return;
- }
-
- // Prepare file request
$nickName = $request->getHeader('X-NC-Nickname');
- $isFileRequest = $attributes->getAttribute('fileRequest', 'enabled') === true;
+ if ($attributes !== null) {
+ $isFileRequest = $attributes->getAttribute('fileRequest', 'enabled') === true;
+ }
// We need a valid nickname for file requests
if ($isFileRequest && ($nickName == null || trim($nickName) === '')) {