]> git.joonet.de Git - adminer.git/commitdiff
SQLite: Quote strings stored in integer columns in export (bug #696)
authorJakub Vrana <jakub@vrana.cz>
Mon, 19 Aug 2019 15:14:27 +0000 (17:14 +0200)
committerJakub Vrana <jakub@vrana.cz>
Mon, 19 Aug 2019 15:14:27 +0000 (17:14 +0200)
adminer/include/adminer.inc.php
changes.txt

index 467220c899336e6483871b24c4ed51c28e78344f..ca193f4b80b6b3f8df202d2a9a7893c2465e8839 100644 (file)
@@ -845,7 +845,7 @@ class Adminer {
                                                foreach ($row as $key => $val) {
                                                        $field = $fields[$key];
                                                        $row[$key] = ($val !== null
-                                                               ? unconvert_field($field, preg_match(number_type(), $field["type"]) && $val != '' && !preg_match('~\[~', $field["full_type"]) ? $val : q(($val === false ? 0 : $val)))
+                                                               ? unconvert_field($field, preg_match(number_type(), $field["type"]) && $val != '' && !preg_match('~\[~', $field["full_type"]) && preg_match('~^[0-9]+$~', $val) ? $val : q(($val === false ? 0 : $val)))
                                                                : "NULL"
                                                        );
                                                }
index 300bb47b9cd6f0dbcf12c769e194a7c49b1f1b1a..124ac4f7b9ffaccb203c532ffa0d274b335e71b5 100644 (file)
@@ -1,5 +1,6 @@
 Adminer 4.7.3-dev:
 MySQL: Skip editing generated columns
+SQLite: Quote strings stored in integer columns in export (bug #696)
 
 Adminer 4.7.2 (released 2019-07-18):
 Do not attempt logging in without password (bug #676)