]> 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:05:19 +0000 (20:05 +1200)
http://laconi.ca/trac/ticket/1735

classes/Notice.php

index e569d8305a3175d637513543b450d1936bbbdf95..c3c8d13c850cc0de3feaa8a30368e6ee0ed7c871 100644 (file)
@@ -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');