Index: includes/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/Attic/database.inc,v
retrieving revision 1.92.2.10
diff -u -r1.92.2.10 database.inc
--- includes/database.inc	6 Aug 2010 11:05:03 -0000	1.92.2.10
+++ includes/database.inc	9 Sep 2010 12:39:16 -0000
@@ -249,8 +249,15 @@
  *   The Schema API type of a field (e.g. 'int', 'text', or 'varchar').
  */
 function db_placeholders($arguments, $type = 'int') {
-  $placeholder = db_type_placeholder($type);
-  return implode(',', array_fill(0, count($arguments), $placeholder));
+  // After ensuring that there is at least one element in the arguments array,
+  // use str_repeat for all elements beyond the first.
+  if (empty($arguments)) {
+    return '';
+  }
+  else {
+    $placeholder = db_type_placeholder($type);
+    return $placeholder . str_repeat(',' . $placeholder, count($arguments) - 1);
+  }
 }
 
 /**
