Skip to content

Commit

Permalink
Change order of checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Sep 6, 2023
1 parent 91c1167 commit ae66957
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/QueryBuilder/AbstractDMLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,15 @@ protected function prepareInsertSelectSubQuery(QueryInterface $columns, array $p
*/
protected function prepareInsertValues(string $table, array|QueryInterface $columns, array $params = []): array
{
if (empty($columns)) {
return [[], [], 'DEFAULT VALUES', []];
}

if ($columns instanceof QueryInterface) {
[$names, $values, $params] = $this->prepareInsertSelectSubQuery($columns, $params);
return [$names, [], $values, $params];
}

if (empty($columns)) {
return [[], [], 'DEFAULT VALUES', []];
}

$names = [];
$placeholders = [];
$columns = $this->normalizeColumnNames($columns);
Expand Down

0 comments on commit ae66957

Please sign in to comment.