summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_dbi.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class
index f64eb4e..ee6d268 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -253,7 +253,7 @@ function _set($tags, $allfields = false)
$dyns[] = $this->escape_string(trim($field, "-")) . ", $value";
else if (substr($field, 0, 1) === '-') # Unquoted value (always added)
$result[] = substr($field, 1) . "=$value";
- else if ($allfields || (isset($value) && isset($this->_data[$field]) ? strval($value) !== strval($this->_data[$field]) : $value !== $this->_data[$field]))
+ else if ($allfields || (isset($value) && isset($this->_data[$field]) ? strval($value) !== strval($this->_data[$field]) : $value !== $this->_data[$field] || !array_key_exists($field, $this->_data)))
{
if ($this->_p['charset'] == "utf8") # NOTE: Mysql charset is simply utf8, not utf-8
$value = it::any2utf8($value, "error in db-field $field");