Merge pull request #30475 from jmptbl/master

This commit is contained in:
John Molakvoæ 2024-02-23 16:13:03 +01:00 committed by GitHub
commit 01aca14a99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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'] = '';