From e1a49a223b7db8b5ddf4c549abfdc6ea1b035daa Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 13 Nov 2018 14:26:33 +0100 Subject: [PATCH] Fix SetVcardDatabaseUID when using postgresql Signed-off-by: Robin Appelman --- lib/private/Repair/NC15/SetVcardDatabaseUID.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/private/Repair/NC15/SetVcardDatabaseUID.php b/lib/private/Repair/NC15/SetVcardDatabaseUID.php index ccf6c47cbc..210fc0a862 100644 --- a/lib/private/Repair/NC15/SetVcardDatabaseUID.php +++ b/lib/private/Repair/NC15/SetVcardDatabaseUID.php @@ -112,7 +112,11 @@ class SetVcardDatabaseUID implements IRepairStep { $count = 0; foreach ($entries as $entry) { $count++; - $uid = $this->getUID($entry['carddata']); + $cardData = $entry['carddata']; + if (is_resource($cardData)) { + $cardData = stream_get_contents($cardData); + } + $uid = $this->getUID($cardData); $this->update($entry['id'], $uid); } $this->connection->commit();