diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-02-23 16:13:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 16:13:03 +0100 |
commit | 01aca14a9940b9da02bba76f573f0e00b344df6f (patch) | |
tree | 74a7bdf6a82be1727e09505c6988de7e8eb190e7 /apps | |
parent | 6c837fd51ea3c60c56adca4c9a2b7fa7f49f797f (diff) | |
parent | 311d1d2306f24f9c2b38d2d8b6911d05440e28d5 (diff) | |
download | nextcloud-server-01aca14a9940b9da02bba76f573f0e00b344df6f.tar.gz nextcloud-server-01aca14a9940b9da02bba76f573f0e00b344df6f.zip |
Merge pull request #30475 from jmptbl/master
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 7 |
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 71d21cfb55c..5bb1581b6ab 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -310,10 +310,11 @@ class ShareAPIController extends OCSController { $shareWithStart = ($hasCircleId ? strrpos($share->getSharedWith(), '[') + 1 : 0); $shareWithLength = ($hasCircleId ? -1 : strpos($share->getSharedWith(), ' ')); - if (is_bool($shareWithLength)) { - $shareWithLength = -1; + if ($shareWithLength === false) { + $result['share_with'] = substr($share->getSharedWith(), $shareWithStart); + } else { + $result['share_with'] = substr($share->getSharedWith(), $shareWithStart, $shareWithLength); } - $result['share_with'] = substr($share->getSharedWith(), $shareWithStart, $shareWithLength); } elseif ($share->getShareType() === IShare::TYPE_ROOM) { $result['share_with'] = $share->getSharedWith(); $result['share_with_displayname'] = ''; |