From: Raphaël Barrois Date: Mon, 7 Feb 2011 07:24:40 +0000 (+0100) Subject: Fix pending NL issue retrieval X-Git-Tag: xorg/1.1.0~1^2~38 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=8dc39e6a39d364ac62ea9a303a38e33a69865033;p=platal.git Fix pending NL issue retrieval Signed-off-by: Raphaël Barrois --- diff --git a/include/newsletter.inc.php b/include/newsletter.inc.php index 97f57eb..da97493 100644 --- a/include/newsletter.inc.php +++ b/include/newsletter.inc.php @@ -240,8 +240,8 @@ class NewsLetter FROM newsletter_issues WHERE nlid = {?} AND state = \'new\'', $this->id); - if ($res->numRows()) { - $id = $res->fetchOneCell(); + $id = $res->fetchOneCell(); + if ($id != null) { return new NLIssue($id, $this); } else if ($create) { $id = $this->createPending();