Fix tests after last changes

[MAILPOET-4639]
This commit is contained in:
Jan Lysý
2023-01-06 20:04:09 +01:00
committed by Aschepikov
parent c79787c677
commit 2e97cb6924
3 changed files with 12 additions and 7 deletions

View File

@ -76,7 +76,7 @@ class MailPoetMapper {
$resultParsed = json_decode($result['message'], true);
$message = __('Error while sending.', 'mailpoet');
if (!is_array($resultParsed)) {
if ($result['error'] === API::ERROR_MESSAGE_DMRAC) {
if (isset($result['error']) && $result['error'] === API::ERROR_MESSAGE_DMRAC) {
$message .= $this->getDmarcMessage($result, $sender);
} else {
$message .= ' ' . $result['message'];