[-] Core: check the existence of the overriden emails templates before try to sending them

This commit is contained in:
Rémi Gaillard
2013-01-22 11:27:51 +01:00
parent 268b581953
commit f40ae37a24
+1 -1
View File
@@ -204,7 +204,7 @@ class MailCore
$template_path = $theme_path.'mails/';
$override_mail = true;
}
else if (!file_exists($template_path.$template.'.txt') && ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_TEXT))
if (!file_exists($template_path.$template.'.txt') && ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_TEXT))
{
Tools::dieOrLog(Tools::displayError('Error - The following e-mail template is missing:').' '.$template_path.$template.'.txt', $die);
return false;