From e86a9a9ffc312e1f1b239ea4ec3d2b613a065a10 Mon Sep 17 00:00:00 2001 From: David Flatz Date: Mon, 8 Oct 2018 15:34:35 +0200 Subject: improve tests and styling --- it_dbi.class | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'it_dbi.class') diff --git a/it_dbi.class b/it_dbi.class index 004c22d..76f4d1a 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -264,7 +264,8 @@ function _set($tags, $force = false) { if (substr($field, 0, 1) === "-") $newdyns[] = "'\$.$f', " . $value; - else if ($force || isset($value) && isset($dyndata[$f]) ? strval($value) !== strval($dyndata[$f]) : $value !== $dyndata[$f] || !array_key_exists($f, $dyndata)) { + else if ($force || isset($value) && isset($dyndata[$f]) ? strval($value) !== strval($dyndata[$f]) : $value !== $dyndata[$f] || !array_key_exists($f, $dyndata)) + { if (is_null($value)) $deldyns[] = "'\$.$f'"; else @@ -284,7 +285,8 @@ function _set($tags, $force = false) { if ($force == "insert") # INSERT/REPLACE $result[] = "dyncols = JSON_OBJECT(" . join(", ", (array)$alldyns) . ")"; - else if ($newdyns || $deldyns) { + else if ($newdyns || $deldyns) + { $source = $this->_dyndata ? 'dyncols' : '"{}"'; if ($newdyns) $source = "JSON_SET($source, " . join(', ', $newdyns) . ')'; -- cgit v1.2.3