Merge commit 'origin/platal-0.10.0'
[platal.git] / include / newsletter.inc.php
index fc94a03..c58844e 100644 (file)
@@ -45,6 +45,9 @@ class NewsLetter extends MassMailer
             }
             $res = XDB::query("SELECT * FROM newsletter WHERE bits='new'");
         }
+        if ($res->numRows() != 1) {
+            throw new MailNotFound();
+        }
         $nl = $res->fetchOneAssoc();
 
         $this->_id        = $nl['id'];