mirror of
https://github.com/Mibew/mibew.git
synced 2025-04-18 12:57:24 +03:00
Do not die if "leave_message" mail template cannot be loaded
This commit is contained in:
parent
8a47afef58
commit
8f346ae0b7
@ -792,7 +792,12 @@ class ThreadProcessor extends ClientSideProcessor implements
|
|||||||
// Prepare message to send by email
|
// Prepare message to send by email
|
||||||
$mail_template = MailTemplate::loadByName('leave_message', $message_locale);
|
$mail_template = MailTemplate::loadByName('leave_message', $message_locale);
|
||||||
if (!$mail_template) {
|
if (!$mail_template) {
|
||||||
throw new \RuntimeException('Cannot load "leave_message" mail template');
|
trigger_error(
|
||||||
|
'Cannot send e-mail because "leave_message" mail template cannot be loaded.',
|
||||||
|
E_USER_WARNING
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = $mail_template->buildSubject(array($args['name']));
|
$subject = $mail_template->buildSubject(array($args['name']));
|
||||||
|
Loading…
Reference in New Issue
Block a user