mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Bugfix: Trying to access array offset on OptionalResponse is null
This commit is contained in:
parent
b24da035df
commit
6435fc3876
2 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ class NegativeResponseException extends ResponseException
|
|||
|
||||
$oResponse = $this->GetLastResponse();
|
||||
if ($oResponse && $oResponse->IsStatusResponse && !empty($oResponse->HumanReadable) &&
|
||||
isset($oResponse->OptionalResponse[0]) && 'ALERT' === $oResponse->OptionalResponse[0])
|
||||
'ALERT' === ($oResponse->OptionalResponse[0] ?? ''))
|
||||
{
|
||||
$sResult = $oResponse->HumanReadable;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class ResponseException extends \MailSo\Imap\Exceptions\Exception
|
|||
{
|
||||
$this->oResponses = $oResponses;
|
||||
if (!$sMessage && $response = $this->GetLastResponse()) {
|
||||
$sMessage = $response->OptionalResponse[0] . ' ' . $response->HumanReadable;
|
||||
$sMessage = ($response->OptionalResponse[0] ?? '') . ' ' . $response->HumanReadable;
|
||||
}
|
||||
parent::__construct($sMessage, $iCode, $oPrevious);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue