summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent FarZz <farcry69@live.fr>2024-08-18 19:54:53 +0200
committerBenjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>2024-10-02 09:21:44 +0200
commitb146952b6317fedc5a846732ebd0c7e0e731a682 (patch)
tree491c0c58b38d8cdbaf8fcf84d489ea1a02b21ebd
parentfcf45b6869e35c3ebdada598318fe7de0d5d4e4a (diff)
downloadnextcloud-server-b146952b6317fedc5a846732ebd0c7e0e731a682.tar.gz
nextcloud-server-b146952b6317fedc5a846732ebd0c7e0e731a682.zip
fix: Prevent crash when refreshing metadata for files without an ownerbackport/47316/stable30
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 231fb2ec98f..5c1acb77ea7 100644
--- a/lib/private/FilesMetadata/FilesMetadataManager.php
+++ b/lib/private/FilesMetadata/FilesMetadataManager.php
@@ -104,7 +104,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;