Skip to content

[stable29] Fix federated reshares#58993

Open
provokateurin wants to merge 2 commits intostable29from
backport/58689/stable29
Open

[stable29] Fix federated reshares#58993
provokateurin wants to merge 2 commits intostable29from
backport/58689/stable29

Conversation

@provokateurin
Copy link
Member

Manual backport of #58689

Signed-off-by: provokateurin <kate@provokateurin.de>
…r might on another server

Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin provokateurin added bug 3. to review Waiting for reviews labels Mar 17, 2026
if ($send) {
$ownerCloudId = $this->cloudIdManager->getCloudId($remoteShare['owner'], $remoteShare['remote']);
$shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_' . time(), $shareType, $expirationDate);
[$token, $remoteId] = $this->notifications->requestReShare(

Check failure

Code scanning / Psalm

TooManyArguments Error

Too many arguments for method OCA\FederatedFileSharing\Notifications::requestreshare - saw 8
$this->storeRemoteId($shareId, $remoteId);
} else {
$this->removeShareFromTable($share);
$this->removeShareFromTable($shareId);

Check failure

Code scanning / Psalm

InvalidScalarArgument Error

Argument 1 of OCA\FederatedFileSharing\FederatedShareProvider::removeShareFromTable expects string, but int provided

if ($failure) {
$this->removeShareFromTableById($shareId);
$this->removeShareFromTable($shareId);

Check failure

Code scanning / Psalm

InvalidScalarArgument Error

Argument 1 of OCA\FederatedFileSharing\FederatedShareProvider::removeShareFromTable expects string, but int provided
}
if ($send) {
$ownerCloudId = $this->cloudIdManager->getCloudId($remoteShare['owner'], $remoteShare['remote']);
$shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_' . time(), $shareType, $expirationDate);

Check notice

Code scanning / Psalm

PossiblyNullArgument Note

Argument 9 of OCA\FederatedFileSharing\FederatedShareProvider::addShareToDB cannot be null, possibly null value provided
if ($send) {
$ownerCloudId = $this->cloudIdManager->getCloudId($remoteShare['owner'], $remoteShare['remote']);
$shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_' . time(), $shareType, $expirationDate);
[$token, $remoteId] = $this->notifications->requestReShare(

Check notice

Code scanning / Psalm

PossiblyInvalidArrayAccess Note

Cannot access array value on non-array variable of type false
if ($send) {
$ownerCloudId = $this->cloudIdManager->getCloudId($remoteShare['owner'], $remoteShare['remote']);
$shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_' . time(), $shareType, $expirationDate);
[$token, $remoteId] = $this->notifications->requestReShare(

Check notice

Code scanning / Psalm

PossiblyInvalidArrayAccess Note

Cannot access array value on non-array variable of type false
[$token, $remoteId] = $this->notifications->requestReShare(
$remoteShare['share_token'],
$remoteShare['remote_id'],
$shareId,

Check notice

Code scanning / Psalm

InvalidArgument Note

Argument 3 of OCA\FederatedFileSharing\Notifications::requestReShare expects string, but int provided
Copy link
Contributor

@salmart-dev salmart-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issues as in stable30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants