mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #41419 from nextcloud/backport/41404/stable26
[stable26] fix(workflow): Fix "Call to a member function getUID() on null" with …
This commit is contained in:
commit
8dd9edc866
1 changed files with 3 additions and 3 deletions
|
|
@ -140,10 +140,10 @@ class File implements IEntity, IDisplayText, IUrl, IIcon, IContextPortation {
|
|||
}
|
||||
}
|
||||
|
||||
public function isLegitimatedForUserId(string $uid): bool {
|
||||
public function isLegitimatedForUserId(string $userId): bool {
|
||||
try {
|
||||
$node = $this->getNode();
|
||||
if ($node->getOwner()->getUID() === $uid) {
|
||||
if ($node->getOwner()?->getUID() === $userId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ class File implements IEntity, IDisplayText, IUrl, IIcon, IContextPortation {
|
|||
$fileId = $node->getId();
|
||||
}
|
||||
|
||||
$mountInfos = $this->userMountCache->getMountsForFileId($fileId, $uid);
|
||||
$mountInfos = $this->userMountCache->getMountsForFileId($fileId, $userId);
|
||||
foreach ($mountInfos as $mountInfo) {
|
||||
$mount = $this->mountManager->getMountFromMountInfo($mountInfo);
|
||||
if ($mount && $mount->getStorage() && !empty($mount->getStorage()->getCache()->get($fileId))) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue