]> git.joonet.de Git - adminer.git/commitdiff
Do not set input type as numeric if field is an array
authorK0n24d <K0n24d@users.noreply.github.com>
Mon, 21 Sep 2015 19:35:51 +0000 (21:35 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sun, 19 Feb 2017 08:45:05 +0000 (09:45 +0100)
adminer/include/functions.inc.php

index 0496cf4d3abda4744adec866450bd9346404844f..b38a2b6bed4ee35979547a50f09d6df0e2c963a1 100644 (file)
@@ -917,7 +917,7 @@ function input($field, $value, $function) {
                        }
                        // type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
                        echo "<input"
-                               . ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) ? " type='number'" : "")
+                               . ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) && !preg_match('~\[\]~', $field["full_type"]) ? " type='number'" : "")
                                . " value='" . h($value) . "'" . ($maxlength ? " data-maxlength='$maxlength'" : "")
                                . (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
                                . "$attrs>"