diff --git a/includes/database/database.inc b/includes/database/database.inc index 1bfb3f7..54cad23 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -736,13 +736,14 @@ abstract class DatabaseConnection extends PDO { // to expand it out into a comma-delimited set of placeholders. foreach (array_filter($args, 'is_array') as $key => $data) { $new_keys = array(); + $placeholder_index = 0; foreach ($data as $i => $value) { // This assumes that there are no other placeholders that use the same // name. For example, if the array placeholder is defined as :example // and there is already an :example_2 placeholder, this will generate // a duplicate key. We do not account for that as the calling code // is already broken if that happens. - $new_keys[$key . '_' . $i] = $value; + $new_keys[$key . '_' . $placeholder_index++] = $value; } // Update the query with the new placeholders.