From e4d3fd4861d6f384dd575bb61efcc67814bc3f63 Mon Sep 17 00:00:00 2001 From: prolyfix Date: Wed, 9 Jun 2021 23:09:31 +0200 Subject: [PATCH] bug resolution: exception when a user test the send mail functionality, an exception is thrown: $object is null in the method_exists's function. and thus not allowed. Adding is_object resolve the problem --- htdocs/core/actions_sendmails.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index b4e583387c9..83a823edeb2 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -345,7 +345,7 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $subject = make_substitutions($subject, $substitutionarray); $message = make_substitutions($message, $substitutionarray); - if (method_exists($object, 'makeSubstitution')) { + if (is_object($object) && method_exists($object, 'makeSubstitution')) { $subject = $object->makeSubstitution($subject); $message = $object->makeSubstitution($message); }