]> git.mxchange.org Git - friendica.git/commitdiff
Avoid SQL warnings because of empty id list.
authorMichael Vogel <icarus@dabo.de>
Mon, 6 Apr 2015 08:12:37 +0000 (10:12 +0200)
committerMichael Vogel <icarus@dabo.de>
Mon, 6 Apr 2015 08:12:37 +0000 (10:12 +0200)
include/api.php

index e5ee36fdf120191d3001a949c28467aafc5a6f0e..cf75428a3d12fa7c3d09d93b466534380df85f8f 100644 (file)
 
                $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);