From 739219278bd419e7b6e380e5dccc95860e697e14 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 6 Apr 2015 10:12:37 +0200 Subject: [PATCH] Avoid SQL warnings because of empty id list. --- include/api.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/api.php b/include/api.php index e5ee36fdf1..cf75428a3d 100644 --- a/include/api.php +++ b/include/api.php @@ -1186,7 +1186,8 @@ $idlist = implode(",", $idarray); - $r = q("UPDATE `item` SET `unseen` = 0 WHERE `unseen` AND `id` IN (%s)", $idlist); + if ($idlist != "") + $r = q("UPDATE `item` SET `unseen` = 0 WHERE `unseen` AND `id` IN (%s)", $idlist); $data = array('$statuses' => $ret); -- 2.39.5