mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-11 01:23:43 +08:00
Catch error of #418 (not the solution)
This commit is contained in:
parent
48a954e077
commit
51411d300a
1 changed files with 12 additions and 7 deletions
|
@ -497,13 +497,18 @@ class Actions
|
|||
{
|
||||
if (null === $this->oAddressBookProvider) {
|
||||
$oDriver = null;
|
||||
// if ($bForceEnable || $this->oConfig->Get('contacts', 'enable', false)) {
|
||||
if ($bForceEnable || $this->GetCapa(Enumerations\Capa::CONTACTS)) {
|
||||
$oDriver = $this->fabrica('address-book', $oAccount);
|
||||
}
|
||||
if ($oAccount && $oDriver) {
|
||||
$oDriver->SetEmail($this->GetMainEmail($oAccount));
|
||||
$oDriver->setDAVClientConfig($this->getContactsSyncData($oAccount));
|
||||
try {
|
||||
// if ($bForceEnable || $this->oConfig->Get('contacts', 'enable', false)) {
|
||||
if ($bForceEnable || $this->GetCapa(Enumerations\Capa::CONTACTS)) {
|
||||
$oDriver = $this->fabrica('address-book', $oAccount);
|
||||
}
|
||||
if ($oAccount && $oDriver) {
|
||||
$oDriver->SetEmail($this->GetMainEmail($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->SetLogger($this->oLogger);
|
||||
|
|
Loading…
Reference in a new issue