From: Michael <heluecht@pirati.ca>
Date: Sat, 3 Mar 2018 13:26:23 +0000 (+0000)
Subject: An array with fieldnames as keys is important for the "insert" in the "update" function
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=194da423e0c9c02eb9a0a55cfd2e75f2cac5936a;p=friendica.git

An array with fieldnames as keys is important for the "insert" in the "update" function
---

diff --git a/include/dba.php b/include/dba.php
index 247e6ac83a..4f7ca4da35 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -1245,7 +1245,7 @@ class dba {
 						$placeholders = substr(str_repeat("?, ", count($value)), 0, -2);
 						$condition_string .= "`" . $field . "` IN (" . $placeholders . ")";
 					} else {
-						$new_values[] = $value;
+						$new_values[$field] = $value;
 						$condition_string .= "`" . $field . "` = ?";
 					}
 				}