Catch error of #418 (not the solution)

This commit is contained in:
the-djmaze 2022-05-28 23:43:02 +02:00
parent 48a954e077
commit 51411d300a

View file

@ -497,6 +497,7 @@ class Actions
{ {
if (null === $this->oAddressBookProvider) { if (null === $this->oAddressBookProvider) {
$oDriver = null; $oDriver = null;
try {
// if ($bForceEnable || $this->oConfig->Get('contacts', 'enable', false)) { // if ($bForceEnable || $this->oConfig->Get('contacts', 'enable', false)) {
if ($bForceEnable || $this->GetCapa(Enumerations\Capa::CONTACTS)) { if ($bForceEnable || $this->GetCapa(Enumerations\Capa::CONTACTS)) {
$oDriver = $this->fabrica('address-book', $oAccount); $oDriver = $this->fabrica('address-book', $oAccount);
@ -505,6 +506,10 @@ class Actions
$oDriver->SetEmail($this->GetMainEmail($oAccount)); $oDriver->SetEmail($this->GetMainEmail($oAccount));
$oDriver->setDAVClientConfig($this->getContactsSyncData($oAccount)); $oDriver->setDAVClientConfig($this->getContactsSyncData($oAccount));
} }
} catch (\Throwable $e) {
$oDriver = null;
\SnappyMail\LOG::error('AddressBook', $e->getMessage());
}
$this->oAddressBookProvider = new Providers\AddressBook($oDriver); $this->oAddressBookProvider = new Providers\AddressBook($oDriver);
$this->oAddressBookProvider->SetLogger($this->oLogger); $this->oAddressBookProvider->SetLogger($this->oLogger);
} }