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:05:19 +1200 |
commit | 06514aa001f8c567918a5e5533b3d4a24f427439 (patch) | |
tree | b8472e830d51ca8c5fafb5c3c90dbc1bebd2f1de | |
parent | 35a78de93b3c804490c604cc124b88edb5ef440e (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 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'); |