]> git.wh0rd.org Git - tt-rss.git/commitdiff
mailer: return 0 if plugin requested to stop (-1)
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 22 Nov 2018 13:39:10 +0000 (16:39 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 22 Nov 2018 13:39:10 +0000 (16:39 +0300)
classes/mailer.php

index f67690e806476c2d7470f0611c0c60ebb5a8fffd..974e33bc4b4fed47193a3771aa612155f028c36b 100644 (file)
@@ -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";