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
This commit is contained in:
prolyfix 2021-06-09 23:09:31 +02:00 committed by GitHub
parent c00bef83a8
commit e4d3fd4861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}