diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Cache/CacheClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Cache/CacheClient.php index 3e2de5bfa..6c9eed004 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Cache/CacheClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Cache/CacheClient.php @@ -25,13 +25,7 @@ class CacheClient /** * @var string */ - private $sCacheIndex; - - function __construct() - { - $this->oDriver = null; - $this->sCacheIndex = ''; - } + private $sCacheIndex = ''; public function Set(string $sKey, string $sValue) : bool { @@ -111,7 +105,7 @@ class CacheClient public function IsInited() : bool { - return $this->oDriver instanceof DriverInterface; + return !!$this->oDriver; } public function SetCacheIndex(string $sCacheIndex) : self diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/NamespaceResult.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/NamespaceResult.php index e0e74a9ab..8705cd548 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/NamespaceResult.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/NamespaceResult.php @@ -49,7 +49,7 @@ class NamespaceResult public function InitByImapResponse(\MailSo\Imap\Response $oImapResponse) : self { - if ($oImapResponse && $oImapResponse instanceof \MailSo\Imap\Response) + if ($oImapResponse) { if (isset($oImapResponse->ResponseList[2][0]) && \is_array($oImapResponse->ResponseList[2][0]) && diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Log/Logger.php b/snappymail/v/0.0.0/app/libraries/MailSo/Log/Logger.php index 8480f2d1d..74ad135df 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Log/Logger.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Log/Logger.php @@ -190,16 +190,16 @@ class Logger extends \SplFixedArray public function WriteException(\Throwable $oException, int $iType = \LOG_NOTICE, string $sName = '') : void { - if (!isset($oException->__LOGINNED__)) { - $oException->__LOGINNED__ = true; + if (empty($oException->__WRITTEN__)) { + $oException->__WRITTEN__ = true; $this->Write((string) $oException, $iType, $sName); } } public function WriteExceptionShort(\Throwable $oException, int $iType = \LOG_NOTICE, string $sName = '') : void { - if (!isset($oException->__LOGINNED__)) { - $oException->__LOGINNED__ = true; + if (empty($oException->__WRITTEN__)) { + $oException->__WRITTEN__ = true; $this->Write($oException->getMessage(), $iType, $sName); } } diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php index 44fe2033c..349bba8b2 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php @@ -1299,11 +1299,6 @@ class MailClient */ public function SetLogger(\MailSo\Log\Logger $oLogger) : self { - if (!($oLogger instanceof \MailSo\Log\Logger)) - { - throw new \InvalidArgumentException; - } - $this->oLogger = $oLogger; $this->oImapClient->SetLogger($this->oLogger);