Skip to content

Commit

Permalink
fix: Prevent crash when refreshing metadata for files without an owner
Browse files Browse the repository at this point in the history
This crash was mostly happening when using external storages and for example the command "occ memories:migrate-google-takeout"

Signed-off-by: Vincent FarZz <[email protected]>
  • Loading branch information
Farcry69 authored and backportbot[bot] committed Sep 16, 2024
1 parent cea10d6 commit ded4bdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/FilesMetadata/FilesMetadataManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function refreshMetadata(
return $this->refreshMetadata($node, self::PROCESS_BACKGROUND);
}

$this->jobList->add(UpdateSingleMetadata::class, [$node->getOwner()->getUID(), $node->getId()]);
$this->jobList->add(UpdateSingleMetadata::class, [$node->getOwner()?->getUID(), $node->getId()]);
}

return $metadata;
Expand Down

0 comments on commit ded4bdd

Please sign in to comment.