From c678031d004f2715e26b4f5aed4da50497e68402 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Fri, 22 Jul 2022 13:23:17 +0200 Subject: [PATCH] KolabAddressBook MessageAsContact always returns Contact object --- plugins/kolab/KolabAddressBook.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/kolab/KolabAddressBook.php b/plugins/kolab/KolabAddressBook.php index 39a111c46..e97ef4835 100644 --- a/plugins/kolab/KolabAddressBook.php +++ b/plugins/kolab/KolabAddressBook.php @@ -75,7 +75,7 @@ class KolabAddressBook implements \RainLoop\Providers\AddressBook\AddressBookInt return $xCard; } - protected function MessageAsContact(\MailSo\Mail\Message $oMessage) : ?Contact + protected function MessageAsContact(\MailSo\Mail\Message $oMessage) : Contact { $oContact = new Contact; $oContact->IdContact = $oMessage->Uid(); @@ -155,10 +155,8 @@ class KolabAddressBook implements \RainLoop\Providers\AddressBook\AddressBookInt } } else { $oContact = $this->MessageAsContact($oMessage); - if ($oContact) { - echo $oContact->ToCsv($bCsvHeader); - $bCsvHeader = false; - } + echo $oContact->ToCsv($bCsvHeader); + $bCsvHeader = false; } } }