summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index e569d8305..c3c8d13c8 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -755,6 +755,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');