aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/DefaultShareProvider.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-11-09 16:26:09 +0100
committerJoas Schilling <coding@schilljs.com>2020-11-10 15:35:43 +0100
commitcffad62771a1640675e92fdc6a85ff013bac2ec4 (patch)
treeafa8909b67d35fea4b21256af43ee4ab4603736b /lib/private/Share20/DefaultShareProvider.php
parent31e243be744aa726178a5ecb15649e7675a049d4 (diff)
downloadnextcloud-server-cffad62771a1640675e92fdc6a85ff013bac2ec4.tar.gz
nextcloud-server-cffad62771a1640675e92fdc6a85ff013bac2ec4.zip
Empty string is returned as null, but empty string in file cache is the root and exists
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Share20/DefaultShareProvider.php')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index e43529086fd..b4ac3b3b84d 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -874,6 +874,11 @@ class DefaultShareProvider implements IShareProvider {
$cursor = $qb->execute();
while ($data = $cursor->fetch()) {
+ if ($data['fileid'] && $data['path'] === null) {
+ $data['path'] = (string) $data['path'];
+ $data['name'] = (string) $data['name'];
+ $data['checksum'] = (string) $data['checksum'];
+ }
if ($this->isAccessibleResult($data)) {
$shares[] = $this->createShare($data);
}
@@ -1004,7 +1009,7 @@ class DefaultShareProvider implements IShareProvider {
->setShareType((int)$data['share_type'])
->setPermissions((int)$data['permissions'])
->setTarget($data['file_target'])
- ->setNote($data['note'])
+ ->setNote((string)$data['note'])
->setMailSend((bool)$data['mail_send'])
->setStatus((int)$data['accepted'])
->setLabel($data['label']);