From: Hypolite Petovan Date: Sun, 1 Jul 2018 08:05:02 +0000 (-0400) Subject: Fix Array to String conversion message for IN conditions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0ee153e1bdebc344746bfea682c2d044b9c5c350;p=friendica.git Fix Array to String conversion message for IN conditions --- diff --git a/include/dba.php b/include/dba.php index 17c62b8144..9d828f8b44 100644 --- a/include/dba.php +++ b/include/dba.php @@ -1015,7 +1015,7 @@ class dba { $commands = []; // Create a key for the loop prevention - $key = $table . ':' . implode(':', array_keys($conditions)) . ':' . implode(':', $conditions); + $key = $table . ':' . json_encode($conditions); // We quit when this key already exists in the callstack. if (isset($callstack[$key])) { @@ -1042,7 +1042,7 @@ class dba { $rel_def = array_values(self::$relation[$table])[0]; // Create a key for preventing double queries - $qkey = $field . '-' . $table . ':' . implode(':', array_keys($conditions)) . ':' . implode(':', $conditions); + $qkey = $field . '-' . $table . ':' . json_encode($conditions); // When the search field is the relation field, we don't need to fetch the rows // This is useful when the leading record is already deleted in the frontend but the rest is done in the backend