From ac5e55c2bdd1c986129d44bdc6ffa1ca3c743ba4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 22 Nov 2018 16:39:10 +0300 Subject: [PATCH] mailer: return 0 if plugin requested to stop (-1) --- classes/mailer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/mailer.php b/classes/mailer.php index f67690e8..974e33bc 100644 --- a/classes/mailer.php +++ b/classes/mailer.php @@ -30,8 +30,11 @@ class Mailer { foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SEND_MAIL) as $p) { $rc = $p->hook_send_mail($this, $params); - if ($rc == 1 || $rc == -1) + if ($rc == 1) return $rc; + + if ($rc == -1) + return 0; } $headers[] = "From: $from_combined"; -- 2.39.5