From 255b45b8900fed7aab59c37b0847e5936bf62e54 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Thu, 10 May 2012 13:21:26 +0000 Subject: New update() optimization: Optimize away 42 <=> "42" --- it_dbi.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it_dbi.class') diff --git a/it_dbi.class b/it_dbi.class index 512cd4c..06e1d1e 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -246,7 +246,7 @@ function _set($tags, $allfields = false) { if (substr($field, 0, 1) == '-') # Unquoted value (always added) $r[] = substr($field, 1)."=$value"; - else if ($allfields || ($value !== $this->_data[$field])) + else if ($allfields || (isset($value) && isset($this->_data[$field]) ? strval($value) !== strval($this->_data[$field]) : $value !== $this->_data[$field])) { if ($this->_p['charset'] == "utf8") # NOTE: Mysql charset is simply utf8, not utf-8 $value = it::any2utf8($value, "error in db-field $field"); -- cgit v1.2.3