From: Jakub Vrana Date: Tue, 6 Feb 2018 13:52:12 +0000 (+0100) Subject: Allow using number_type() as pattern X-Git-Tag: v4.6.1~38 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=b649fb2f3f4d6a01e6f088f29223094cf346afaf;p=adminer.git Allow using number_type() as pattern --- diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 6b82bc0b..44dae5c9 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -820,7 +820,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 != '' ? $val : q($val)) + ? unconvert_field($field, preg_match(number_type(), $field["type"]) && $val != '' ? $val : q($val)) : "NULL" ); } diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index 8fb46b21..ff34638d 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -155,7 +155,7 @@ echo optionlist(array_merge($extra_types, $structured_types), $type); " size="3" aria-labelledby="label-length">