diff --git a/core/lib/Drupal/Core/Database/Query/Upsert.php b/core/lib/Drupal/Core/Database/Query/Upsert.php index b10d3ea..8133c19 100644 --- a/core/lib/Drupal/Core/Database/Query/Upsert.php +++ b/core/lib/Drupal/Core/Database/Query/Upsert.php @@ -49,8 +49,8 @@ public function __construct(Connection $connection, $table, array $options = []) /** * Sets the unique fields to be used as conditions for this query. * - * @param array $fields - * The name of the fields that form an unique key. + * @param string|array $fields + * The name of the field(s) that form an unique key. * * @return $this */ @@ -58,7 +58,7 @@ public function key($fields) { $fields = (array) $fields; if (count($fields) > 1) { - throw new \InvalidArgumentException('Only '); + throw new \InvalidArgumentException('Unique indexes composed of multiple fields are not supported.'); } // @todo We only support unique indexes that are composed of a single field.