1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-14 02:23:59 +02:00

SQLite: Quote strings stored in integer columns in export (bug #696)

This commit is contained in:
Jakub Vrana
2019-08-19 17:14:27 +02:00
parent 00d36efcf1
commit 4a27882a97
2 changed files with 2 additions and 1 deletions

View 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"
);
}