1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Editor: Fix displaying of false values in PostgreSQL (bug #568)

This commit is contained in:
Jakub Vrana
2018-01-23 11:02:15 +01:00
parent 7b9d5a29aa
commit 0cdd8beab1
3 changed files with 3 additions and 2 deletions

View File

@@ -915,7 +915,7 @@ function input($field, $value, $function) {
echo $input;
} elseif (preg_match('~bool~', $field["type"])) {
echo "<input type='hidden'$attrs value='0'>" .
"<input type='checkbox'" . (in_array(strtolower($value), array('1', 't', 'true', 'y', 'yes', 'on')) ? " checked='checked'" : "") . "$attrs value='1'>";
"<input type='checkbox'" . (preg_match('~^(1|t|true|y|yes|on)$~i', $value) ? " checked='checked'" : "") . "$attrs value='1'>";
} elseif ($field["type"] == "set") { //! 64 bits
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
foreach ($matches[1] as $i => $val) {