Skip to content

Commit

Permalink
fix: [internal] Check if values is not empty for MysqlExtended
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubOnderka committed Mar 24, 2024
1 parent aaa8301 commit 5247b9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Model/Datasource/Database/MysqlExtended.php
Expand Up @@ -177,6 +177,10 @@ public function execute($sql, $options = [], $params = [])
*/
public function insertMulti($table, $fields, $values)
{
if (empty($values)) {
return true;
}

$table = $this->fullTableName($table);
$holder = substr(str_repeat('?,', count($fields)), 0, -1);
$fields = implode(',', array_map([$this, 'name'], $fields));
Expand Down

0 comments on commit 5247b9c

Please sign in to comment.