From f40ae37a2463ab71596625bf202f0c0cb3cb2ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Tue, 22 Jan 2013 11:27:51 +0100 Subject: [PATCH] [-] Core: check the existence of the overriden emails templates before try to sending them --- classes/Mail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Mail.php b/classes/Mail.php index 3bc3d3788..ea6a7134f 100644 --- a/classes/Mail.php +++ b/classes/Mail.php @@ -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;