aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Kotelnikov <fox@woland.me>2024-11-16 11:20:43 +0500
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-11-19 18:31:18 +0000
commit89d43acdbc109f9d5283def98cb3cc1c1534e939 (patch)
tree61c65c8d3b328af1c96701e2729f5560318e85ea
parent42ca32b085d0e1c9df256818f047206382a9c7fd (diff)
downloadnextcloud-server-backport/49332/stable29.tar.gz
nextcloud-server-backport/49332/stable29.zip
fix(job): Check if carddata is resource and read it to stringbackport/49332/stable29
Fixes nextcloud/server#46100 Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com> Signed-off-by: Mikhail Kotelnikov <fox@woland.me>
-rw-r--r--apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
index 9881d2903cb..873f3a063eb 100644
--- a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
+++ b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
@@ -89,7 +89,11 @@ class BuildSocialSearchIndexBackgroundJob extends QueuedJob {
// refresh identified contacts in order to re-index
foreach ($social_cards as $contact) {
$offset = $contact['id'];
- $this->davBackend->updateCard($contact['addressbookid'], $contact['uri'], $contact['carddata']);
+ $cardData = $contact['carddata'];
+ if (is_resource($cardData) && (get_resource_type($cardData) === 'stream')) {
+ $cardData = stream_get_contents($cardData);
+ }
+ $this->davBackend->updateCard($contact['addressbookid'], $contact['uri'], $cardData);
// stop after 15sec (to be continued with next chunk)
if (($this->time->getTime() - $startTime) > 15) {