Fix SetVcardDatabaseUID when using postgresql

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-11-13 14:26:33 +01:00
parent 5e84824839
commit e1a49a223b
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -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();