return;
}
+ $uniqueIndexes = (array)$uniqueIndexes;
// Single row case
if ( !is_array( reset( $rows ) ) ) {
$rows = [ $rows ];
$this->query( $sql, $fname );
}
- public function upsert( $table, array $rows, array $uniqueIndexes, array $set,
+ public function upsert( $table, array $rows, $uniqueIndexes, array $set,
$fname = __METHOD__
) {
if ( $rows === [] ) {
return true; // nothing to do
}
+ $uniqueIndexes = (array)$uniqueIndexes;
if ( !is_array( reset( $rows ) ) ) {
$rows = [ $rows ];
}