]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix for SQL error: ERROR: syntax error at or near ")" at character 45
authorBrenda Wallace <shiny@cpan.org>
Fri, 28 Aug 2009 08:00:55 +0000 (20:00 +1200)
committerBrenda Wallace <shiny@cpan.org>
Fri, 28 Aug 2009 08:00:55 +0000 (20:00 +1200)
http://laconi.ca/trac/ticket/1735

classes/Notice.php

index 28d5b8ddf940bb2f7bbed2e50c2ea69e7a8140ff..89afe9d1dca74da958082c68153e8bb01d560230 100644 (file)
@@ -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');