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');