From: Michael Vogel Date: Mon, 6 Apr 2015 08:12:37 +0000 (+0200) Subject: Avoid SQL warnings because of empty id list. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=739219278bd419e7b6e380e5dccc95860e697e14;p=friendica.git Avoid SQL warnings because of empty id list. --- 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);