Skip to content

Commit

Permalink
Merge pull request #12439 from nextcloud/vcard_uid_repair_postgres
Browse files Browse the repository at this point in the history
Fix SetVcardDatabaseUID when using postgresql
  • Loading branch information
MorrisJobke authored Nov 13, 2018
2 parents 5e84824 + e1a49a2 commit e36924e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/Repair/NC15/SetVcardDatabaseUID.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ private function repair(): int {
$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();
Expand Down

0 comments on commit e36924e

Please sign in to comment.