summaryrefslogtreecommitdiffstats
path: root/lib/private/DB/Connection.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB/Connection.php')
-rw-r--r--lib/private/DB/Connection.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php
index 7aa3a020113..f59c6b34836 100644
--- a/lib/private/DB/Connection.php
+++ b/lib/private/DB/Connection.php
@@ -471,22 +471,22 @@ class Connection extends PrimaryReadReplicaConnection {
foreach ($values as $name => $value) {
$updateQb->set($name, $updateQb->createNamedParameter($value, $this->getType($value)));
}
- $where = $updateQb->expr()->andX();
+ $where = [];
$whereValues = array_merge($keys, $updatePreconditionValues);
foreach ($whereValues as $name => $value) {
if ($value === '') {
- $where->add($updateQb->expr()->emptyString(
+ $where[] = $updateQb->expr()->emptyString(
$name
- ));
+ );
} else {
- $where->add($updateQb->expr()->eq(
+ $where[] = $updateQb->expr()->eq(
$name,
$updateQb->createNamedParameter($value, $this->getType($value)),
$this->getType($value)
- ));
+ );
}
}
- $updateQb->where($where);
+ $updateQb->where($updateQb->expr()->andX(...$where));
$affected = $updateQb->executeStatement();
if ($affected === 0 && !empty($updatePreconditionValues)) {