diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-11-13 16:22:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 16:22:10 +0100 |
commit | e36924e3f9fe5792ba28ed0e81c0c976b0a6277c (patch) | |
tree | a970a1c9eac0d1bf073fb851cf2ea5789cb5ea9e | |
parent | 5e8482483934e1d39703c1568b532fa26724a6c5 (diff) | |
parent | e1a49a223b7db8b5ddf4c549abfdc6ea1b035daa (diff) | |
download | nextcloud-server-e36924e3f9fe5792ba28ed0e81c0c976b0a6277c.tar.gz nextcloud-server-e36924e3f9fe5792ba28ed0e81c0c976b0a6277c.zip |
Merge pull request #12439 from nextcloud/vcard_uid_repair_postgres
Fix SetVcardDatabaseUID when using postgresql
-rw-r--r-- | lib/private/Repair/NC15/SetVcardDatabaseUID.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Repair/NC15/SetVcardDatabaseUID.php b/lib/private/Repair/NC15/SetVcardDatabaseUID.php index ccf6c47cbc8..210fc0a862c 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(); |