From ab76024da789b8cfd083b6663b0c5cc645317fc0 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 19 Aug 2019 17:18:56 +0200 Subject: [PATCH] Support unquoted floats in export --- adminer/include/adminer.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index ca193f4b..daad42a3 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -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"]) && preg_match('~^[0-9]+$~', $val) ? $val : q(($val === false ? 0 : $val))) + ? unconvert_field($field, preg_match(number_type(), $field["type"]) && !preg_match('~\[~', $field["full_type"]) && preg_match('~^([0-9]*\.)?[0-9]+$~', $val) ? $val : q(($val === false ? 0 : $val))) : "NULL" ); }