From 95a92ceb9536a9484421831e7e483caa8948a09c Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 20 Aug 2019 09:47:01 +0200 Subject: [PATCH] Use is_numeric() --- 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 daad42a3..d8044e5f 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"]) && !preg_match('~\[~', $field["full_type"]) && preg_match('~^([0-9]*\.)?[0-9]+$~', $val) ? $val : q(($val === false ? 0 : $val))) + ? unconvert_field($field, preg_match(number_type(), $field["type"]) && !preg_match('~\[~', $field["full_type"]) && is_numeric($val) ? $val : q(($val === false ? 0 : $val))) : "NULL" ); }