diff options
author | Brenda Wallace <shiny@cpan.org> | 2009-08-28 20:00:55 +1200 |
---|---|---|
committer | Brenda Wallace <shiny@cpan.org> | 2009-08-28 20:00:55 +1200 |
commit | e277c856d65885a487b4d7f090a10cf817da836a (patch) | |
tree | e4e7752a3e3a5eb969cf5d168d2f4e6044a90659 | |
parent | c0d03fc2799c7b0c57d05166b404a3d13427f497 (diff) |
fix for SQL error: ERROR: syntax error at or near ")" at character 45
http://laconi.ca/trac/ticket/1735
-rw-r--r-- | classes/Notice.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 28d5b8ddf..89afe9d1d 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'); |