diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2024-11-21 05:42:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-21 05:42:03 +0100 |
commit | 824536d548fee764071efcde2356953077e9d343 (patch) | |
tree | 607033d7a3f07bed7d2427851204b8a8e488baa1 /apps | |
parent | 3f6d5c1b4c4a3d7f940db7d3b63967476ec7cdb6 (diff) | |
parent | b94f396c4fb6b0eb55c3cb768ff36e624ea43d9c (diff) | |
download | nextcloud-server-824536d548fee764071efcde2356953077e9d343.tar.gz nextcloud-server-824536d548fee764071efcde2356953077e9d343.zip |
Merge pull request #49400 from nextcloud/backport/49332/stable30
[stable30] fix(job): Check if carddata is resource and read it to string
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php index 138f764f1e6..f727f4ea09a 100644 --- a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php +++ b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php @@ -71,7 +71,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) { |