[3899] trunk/htdocs/system/classes/comments.php: In Comments::get(), Don' t add an empty IN clause if we're passed an empty array for ids.

0 views
Skip to first unread message

svn-N...@habariproject.org

unread,
Dec 15, 2009, 11:56:26 PM12/15/09
to habar...@googlegroups.com
Revision
3899
Author
michaeltwofish
Date
2009-12-16 04:56:26 +0000 (Wed, 16 Dec 2009)

Log Message

In Comments::get(), Don't add an empty IN clause if we're passed an empty array for ids. Closes #1100. Thanks lildude for the report and patch.

Modified Paths

Diff

Modified: trunk/htdocs/system/classes/comments.php (3898 => 3899)


--- trunk/htdocs/system/classes/comments.php	2009-12-16 03:37:47 UTC (rev 3898)
+++ trunk/htdocs/system/classes/comments.php	2009-12-16 04:56:26 UTC (rev 3899)
@@ -66,7 +66,7 @@
 						$where[] = "{comments}.id= ?";
 						$params[] = $paramset['id'];
 					}
-					else if ( is_array( $paramset['id'] ) ) {
+					else if ( is_array( $paramset['id'] ) && !empty( $paramset['id'] ) ) {
 						$id_list = implode( ',', $paramset['id'] );
 						// Clean up the id list - remove all non-numeric or comma information
 						$id_list = preg_replace( "/[^0-9,]/", "", $id_list );
Reply all
Reply to author
Forward
0 new messages