summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
authorChristian Schneider2012-05-10 13:21:26 +0000
committerChristian Schneider2012-05-10 13:21:26 +0000
commit255b45b8900fed7aab59c37b0847e5936bf62e54 (patch)
treefef39228421c7c3b64dfd604b57c1e103643a824 /it_dbi.class
parent3b876e6feff6b67290e69ec64704468f74c573e3 (diff)
downloaditools-255b45b8900fed7aab59c37b0847e5936bf62e54.tar.gz
itools-255b45b8900fed7aab59c37b0847e5936bf62e54.tar.bz2
itools-255b45b8900fed7aab59c37b0847e5936bf62e54.zip
New update() optimization: Optimize away 42 <=> "42"
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class2
1 files changed, 1 insertions, 1 deletions
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");