[Pkg-owncloud-commits] [owncloud] 55/118: Also use all keys for an empty array, just in case
David Prévot
taffit at moszumanska.debian.org
Fri Mar 27 22:13:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit f15d41e185e9c3dfbb1195ee580bc06094f686d4
Author: Joas Schilling <nickvergessen at owncloud.com>
Date: Thu Mar 12 09:18:43 2015 +0100
Also use all keys for an empty array, just in case
---
lib/private/db/adapter.php | 2 +-
lib/private/db/adaptersqlite.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/private/db/adapter.php b/lib/private/db/adapter.php
index d0641f1..de7b04c 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 1528285..31f8894 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)) . '`';
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list