? .directory
? drupal-485618.patch
? includes/.directory
Index: includes/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/Attic/database.inc,v
retrieving revision 1.92.2.9
diff -u -p -r1.92.2.9 database.inc
--- includes/database.inc	1 Feb 2010 16:32:10 -0000	1.92.2.9
+++ includes/database.inc	1 Jul 2010 18:55:26 -0000
@@ -250,7 +250,16 @@ function _db_query_callback($match, $ini
  */
 function db_placeholders($arguments, $type = 'int') {
   $placeholder = db_type_placeholder($type);
-  return implode(',', array_fill(0, count($arguments), $placeholder));
+  $argument_count = count($arguments);
+
+  // After ensuring that there is at least one element in the arguments array,
+  // use str_repeat for all elements beyond the first.
+  if ($argument_count == 0) {
+    return '';
+  }
+  else {
+    return $placeholder . str_repeat(',' . $placeholder, $argument_count - 1);
+  }
 }
 
 /**
@@ -392,7 +401,7 @@ function db_rewrite_sql($query, $primary
  * Adds the DISTINCT flag to the supplied query if a DISTINCT doesn't already
  * exist in the query. Returns the altered query.
  *
- * This will not, and never did guarantee that you will obtain distinct 
+ * This will not, and never did guarantee that you will obtain distinct
  * values of $table.$field.
  *
  * @param $table Unused. Kept to remain API compatibility.
