Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Feb 21, 2024

Backport of #43727

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Remove all the empty commits

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot requested review from artonge, skjnldsv and susnux February 21, 2024 17:38
@backportbot backportbot bot added 3. to review Waiting for reviews feature: versions javascript php Pull requests that update Php code labels Feb 21, 2024
@backportbot backportbot bot added this to the Nextcloud 26.0.12 milestone Feb 21, 2024
@artonge
Copy link
Contributor

artonge commented Feb 21, 2024

/compile amend /

@artonge artonge marked this pull request as ready for review February 21, 2024 17:49
// The version source file is relative to the owner storage.
// But we need the node from the current user perspective.
if ($node->getOwner()->getUID() !== $currentUserId) {
$nodes = $this->userFolder->getById($node->getId());

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method getById on possibly null value
// The version source file is relative to the owner storage.
// But we need the node from the current user perspective.
if ($node->getOwner()->getUID() !== $currentUserId) {
$nodes = $this->userFolder->getById($node->getId());

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 1 of OCP\Files\Folder::getById cannot be null, possibly null value provided
@skjnldsv
Copy link
Member

psalm says no

@artonge artonge force-pushed the backport/43727/stable26 branch 2 times, most recently from 8889779 to 216c94c Compare February 21, 2024 18:43
@artonge artonge force-pushed the backport/43727/stable26 branch from 216c94c to 38302dc Compare February 21, 2024 18:48
@artonge artonge force-pushed the backport/43727/stable26 branch from 38302dc to 1d84ff3 Compare February 21, 2024 18:50
throw new NotFoundException("No user logged in");
}

if ($sourceFile->getOwner()?->getUID() !== $currentUserId) {

Check notice

Code scanning / Psalm

DocblockTypeContradiction

OCP\IUser does not contain null
throw new NotFoundException("No user logged in");
}

if ($sourceFile->getOwner()?->getUID() !== $currentUserId) {

Check notice

Code scanning / Psalm

RedundantConditionGivenDocblockType

Docblock-defined type OCP\IUser for $__tmp_nullsafe__8494 is never null
@artonge artonge force-pushed the backport/43727/stable26 branch 3 times, most recently from 74a7f36 to 37df1b7 Compare February 21, 2024 21:04
@skjnldsv skjnldsv mentioned this pull request Feb 21, 2024
1 task
@skjnldsv skjnldsv merged commit 202428b into stable26 Feb 22, 2024
@skjnldsv skjnldsv deleted the backport/43727/stable26 branch February 22, 2024 09:46
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish feature: versions javascript php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants