diff options
author | Joas Schilling <coding@schilljs.com> | 2020-11-09 16:26:09 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-11-10 15:35:43 +0100 |
commit | cffad62771a1640675e92fdc6a85ff013bac2ec4 (patch) | |
tree | afa8909b67d35fea4b21256af43ee4ab4603736b /lib/private/Share20/DefaultShareProvider.php | |
parent | 31e243be744aa726178a5ecb15649e7675a049d4 (diff) | |
download | nextcloud-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.php | 7 |
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']); |