Просмотр исходного кода

Also use all keys for an empty array, just in case

tags/v8.1.0alpha1
Joas Schilling 9 лет назад
Родитель
Сommit
fefcbb966b
2 измененных файлов: 2 добавлений и 2 удалений
  1. 1
    1
      lib/private/db/adapter.php
  2. 1
    1
      lib/private/db/adaptersqlite.php

+ 1
- 1
lib/private/db/adapter.php Просмотреть файл

@@ -50,7 +50,7 @@ class Adapter {
* @throws \Doctrine\DBAL\DBALException
*/
public function insertIfNotExist($table, $input, array $compare = null) {
if ($compare === null) {
if (empty($compare)) {
$compare = array_keys($input);
}
$query = 'INSERT INTO `' .$table . '` (`'

+ 1
- 1
lib/private/db/adaptersqlite.php Просмотреть файл

@@ -29,7 +29,7 @@ class AdapterSqlite extends Adapter {
* @throws \Doctrine\DBAL\DBALException
*/
public function insertIfNotExist($table, $input, array $compare = null) {
if ($compare === null) {
if (empty($compare)) {
$compare = array_keys($input);
}
$fieldList = '`' . implode('`,`', array_keys($input)) . '`';

Загрузка…
Отмена
Сохранить