From b2a1c9439fa17638720bc7e4f0348f32221224cc Mon Sep 17 00:00:00 2001 From: wikimediaWfan <96108825+wikimediaWfan@users.noreply.github.com> Date: Mon, 3 Oct 2022 11:54:03 -0700 Subject: [PATCH] prevent the get property from non-object error Check if $mail->from exist and if not set reply to to blank Bug: T318837 --- CRM/Utils/Mail/EmailProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/Mail/EmailProcessor.php b/CRM/Utils/Mail/EmailProcessor.php index 49e20acfb3..a31bef4d3d 100644 --- a/CRM/Utils/Mail/EmailProcessor.php +++ b/CRM/Utils/Mail/EmailProcessor.php @@ -243,7 +243,7 @@ class CRM_Utils_Mail_EmailProcessor { // get $replyTo from either the Reply-To header or from From // FIXME: make sure it works with Reply-Tos containing non-email stuff - $replyTo = $mail->getHeader('Reply-To') ? $mail->getHeader('Reply-To') : $mail->from->email; + $replyTo = $mail->getHeader('Reply-To') ? $mail->getHeader('Reply-To') : ($mail->from ? $mail->from->email : ""); // handle the action by passing it to the proper API call // FIXME: leave only one-letter cases when dropping legacy support -- 2.25.1