فهرست منبع

Merge pull request #49389 from nextcloud/backport/49332/stable29

[stable29] fix(job): Check if carddata is resource and read it to string
Git'Fellow 18 ساعت پیش
والد
کامیت
fbbe84533e
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php

+ 5 - 1
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) {