Check if key exists

[MAILPOET-1787]
This commit is contained in:
Ján Mikláš
2019-02-21 14:58:40 +01:00
committed by M. Shull
parent f5feb032fe
commit a79b60b17a

View File

@ -120,7 +120,7 @@ class ServicesChecker {
function isFromEmailAuthorized($display_error_notice = true) {
$mta_log_error = $this->settings->get('mta_log.error', []);
if ($mta_log_error && $mta_log_error['operation'] === MailerError::OPERATION_AUTHORIZATION) {
if (isset($mta_log_error['operation']) && $mta_log_error['operation'] === MailerError::OPERATION_AUTHORIZATION) {
if ($display_error_notice) {
WPNotice::displayError($mta_log_error['error_message'], 'js-error-unauthorized-email', '', false, false);
}