aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/FilesMetadata
diff options
context:
space:
mode:
authorVincent FarZz <farcry69@live.fr>2024-08-18 19:54:53 +0200
committerVincent FarZz <farcry69@live.fr>2024-08-18 20:03:32 +0200
commitc2e1c9f8dce9c21c0180440f3bceb82f5887053b (patch)
tree986081222bf76b54b6e787a15a3f036109acacae /lib/private/FilesMetadata
parent6fce6fa1d691501c0db19318dbc1d0b5bb146708 (diff)
downloadnextcloud-server-c2e1c9f8dce9c21c0180440f3bceb82f5887053b.tar.gz
nextcloud-server-c2e1c9f8dce9c21c0180440f3bceb82f5887053b.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>
Diffstat (limited to 'lib/private/FilesMetadata')
-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;