Skip to content

Commit

Permalink
Merge pull request #4054 from putyourlightson/patch-3
Browse files Browse the repository at this point in the history
Upsert bugfix
  • Loading branch information
brandonkelly authored Mar 26, 2019
2 parents d5a4053 + 3062def commit 540ab63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/db/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ public function upsert($table, $insertColumns, $updateColumns = true, $params =

// todo: hack for BC with our old upsert() method. Remove in Craft 4
// Merge any updateColumn data into insertColumns
$insertColumns = array_merge($updateColumns, $insertColumns);
if (is_array($updateColumns)) {
$insertColumns = array_merge($updateColumns, $insertColumns);
}

parent::upsert($table, $insertColumns, $updateColumns, $params);
return $this;
Expand Down

0 comments on commit 540ab63

Please sign in to comment.