From: Brenda Wallace Date: Fri, 28 Aug 2009 08:00:55 +0000 (+1200) Subject: fix for SQL error: ERROR: syntax error at or near ")" at character 45 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e277c856d65885a487b4d7f090a10cf817da836a;p=quix0rs-gnu-social.git fix for SQL error: ERROR: syntax error at or near ")" at character 45 http://laconi.ca/trac/ticket/1735 --- diff --git a/classes/Notice.php b/classes/Notice.php index 28d5b8ddf9..89afe9d1dc 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -732,6 +732,10 @@ class Notice extends Memcached_DataObject return new ArrayWrapper($notices); } else { $notice = new Notice(); + if (empty($ids)) { + //if no IDs requested, just return the notice object + return $notice; + } $notice->whereAdd('id in (' . implode(', ', $ids) . ')'); $notice->orderBy('id DESC');