Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-03-12 11:18:43 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2015-03-16 13:47:10 +0300
commitf15d41e185e9c3dfbb1195ee580bc06094f686d4 (patch)
treedb55238ad3212a72769e854e8412c1f783b7bf17 /lib
parent27df0a17350760125f3093e708db717d5487f5f3 (diff)
Also use all keys for an empty array, just in case
Diffstat (limited to 'lib')
-rw-r--r--lib/private/db/adapter.php2
-rw-r--r--lib/private/db/adaptersqlite.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/db/adapter.php b/lib/private/db/adapter.php
index d0641f113f3..de7b04c74db 100644
--- a/lib/private/db/adapter.php
+++ b/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 . '` (`'
diff --git a/lib/private/db/adaptersqlite.php b/lib/private/db/adaptersqlite.php
index 1528285e11a..31f88940f0b 100644
--- a/lib/private/db/adaptersqlite.php
+++ b/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)) . '`';