aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent FarZz <farcry69@live.fr>2024-08-18 19:54:53 +0200
committerGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-09-22 08:30:34 +0200
commit0c12c067b0533a57fa7f69e3ac2b20d2d56ebb87 (patch)
treecd86f6635dded20d238b8d40d5a27717e594fa18
parent3af9721d5242e452cc51e9b6d09f4424143bfd37 (diff)
downloadnextcloud-server-0c12c067b0533a57fa7f69e3ac2b20d2d56ebb87.tar.gz
nextcloud-server-0c12c067b0533a57fa7f69e3ac2b20d2d56ebb87.zip
fix: Prevent crash when refreshing metadata for files without an owner
This crash was mostly happening when using external storages and for example the command "occ memories:migrate-google-takeout" Signed-off-by: Vincent FarZz <farcry69@live.fr>
-rw-r--r--lib/private/FilesMetadata/FilesMetadataManager.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/FilesMetadata/FilesMetadataManager.php b/lib/private/FilesMetadata/FilesMetadataManager.php
index 013c85af604..6f7faf5d61c 100644
--- a/lib/private/FilesMetadata/FilesMetadataManager.php
+++ b/lib/private/FilesMetadata/FilesMetadataManager.php
@@ -122,7 +122,7 @@ class FilesMetadataManager implements IFilesMetadataManager {
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;