Merge pull request #13321 from nextcloud/bugfix/noid/backport-of-issues-fixed-in-12105
[stable14] Force var to be integer
This commit is contained in:
commit
25fe43fa1a
|
@ -239,6 +239,9 @@ class ShareAPIController extends OCSController {
|
||||||
|
|
||||||
$shareWithStart = ($hasCircleId? strrpos($share->getSharedWith(), '[') + 1: 0);
|
$shareWithStart = ($hasCircleId? strrpos($share->getSharedWith(), '[') + 1: 0);
|
||||||
$shareWithLength = ($hasCircleId? -1: strpos($share->getSharedWith(), ' '));
|
$shareWithLength = ($hasCircleId? -1: strpos($share->getSharedWith(), ' '));
|
||||||
|
if (is_bool($shareWithLength)) {
|
||||||
|
$shareWithLength = -1;
|
||||||
|
}
|
||||||
$result['share_with'] = substr($share->getSharedWith(), $shareWithStart, $shareWithLength);
|
$result['share_with'] = substr($share->getSharedWith(), $shareWithStart, $shareWithLength);
|
||||||
} else if ($share->getShareType() === Share::SHARE_TYPE_ROOM) {
|
} else if ($share->getShareType() === Share::SHARE_TYPE_ROOM) {
|
||||||
$result['share_with'] = $share->getSharedWith();
|
$result['share_with'] = $share->getSharedWith();
|
||||||
|
|
Loading…
Reference in New Issue