diff options
author | Christian Schneider | 2020-07-01 16:33:03 +0200 |
---|---|---|
committer | Christian Schneider | 2020-07-01 16:33:03 +0200 |
commit | 083296d689e4a40dc0bebb0a6f69c8342d6d3a2e (patch) | |
tree | d9a73c78d744bc474b246ceefc6b96c58d2e96d8 /it_dbi.class | |
parent | 007ed5dbc6aac41ecbf020484b4ccf401f2a86fc (diff) | |
download | itools-083296d689e4a40dc0bebb0a6f69c8342d6d3a2e.tar.gz itools-083296d689e4a40dc0bebb0a6f69c8342d6d3a2e.tar.bz2 itools-083296d689e4a40dc0bebb0a6f69c8342d6d3a2e.zip |
Preserve type when writing int to dyncols
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class index 00d5c99..7223904 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -269,11 +269,13 @@ function _set($tags, $force = false) { if (is_null($value)) $deldyns[] = "'\$.$f'"; + if (is_int($value)) + $newdyns[] = "'\$.$f', $value"; else $newdyns[] = "'\$.$f', " . $this->escape_string($value); } - $alldyns[] = $this->escape_string($f) . ", " . (substr($field, 0, 1) === "-" ? $value : $this->escape_string($value)); + $alldyns[] = $this->escape_string($f) . ", " . (substr($field, 0, 1) === "-" || is_int($value) ? $value : $this->escape_string($value)); $dyndata[$f] = $value; } else if (substr($field, 0, 1) === '-') # Unquoted value (always added) |