diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Exceptions/ResponseException.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Exceptions/ResponseException.php index 464cf4c65..bc62eeb5e 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Exceptions/ResponseException.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Exceptions/ResponseException.php @@ -39,9 +39,6 @@ class ResponseException extends \MailSo\Imap\Exceptions\Exception public function GetLastResponse() : ?\MailSo\Imap\Response { - if ($this->oResponses && \count($this->oResponses)) { - return $this->oResponses[count($this->oResponses) - 1]; - } - return null; + return $this->oResponses ? $this->oResponses->getLast() : null; } } diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php index df7afde87..4bd00ba4a 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php @@ -39,11 +39,6 @@ class ImapClient extends \MailSo\Net\NetClient */ private $oCurrentFolderInfo = null; - /** - * @var ResponseCollection - */ - private $oLastResponse; - /** * @var array */ @@ -76,7 +71,6 @@ class ImapClient extends \MailSo\Net\NetClient function __construct() { - $this->oLastResponse = new ResponseCollection; \ini_set('xdebug.max_nesting_level', 500); } @@ -989,11 +983,11 @@ class ImapClient extends \MailSo\Net\NetClient \MailSo\Base\Utils::MultipleStreamWriter($rMessageAppendStream, array($this->ConnectionResource())); $this->sendRaw(''); - $this->getResponse(); + $oResponse = $this->getResponse(); if (null !== $iUid) { - $oLast = $this->GetLastResponse()->getLast(); + $oLast = $oResponse->getLast(); if ($oLast && Enumerations\ResponseType::TAGGED === $oLast->ResponseType && \is_array($oLast->OptionalResponse)) { if (\strlen($oLast->OptionalResponse[0]) && @@ -1099,11 +1093,6 @@ class ImapClient extends \MailSo\Net\NetClient \MailSo\Log\Enumerations\Type::NOTICE, true); } - public function GetLastResponse() : ResponseCollection - { - return $this->oLastResponse; - } - /** * @throws \MailSo\Imap\Exceptions\ResponseNotFoundException * @throws \MailSo\Imap\Exceptions\InvalidResponseException @@ -1140,8 +1129,6 @@ class ImapClient extends \MailSo\Net\NetClient } } - $this->oLastResponse = $oResult; - $oResult->validate(); } catch (\Throwable $e) {