1
0
Fork 0

Fix Array to String conversion message for IN conditions

This commit is contained in:
Hypolite Petovan 2018-07-01 04:05:02 -04:00
parent 89e4629c16
commit 0ee153e1bd

View file

@ -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