]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL PDO: Do not select NULL function for false values in edit (thanks to PR...
authorJakub Vrana <jakub@vrana.cz>
Mon, 8 Feb 2021 12:23:48 +0000 (13:23 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 8 Feb 2021 12:23:48 +0000 (13:23 +0100)
adminer/include/functions.inc.php
changes.txt

index 6030bc22f8224a800c6c3726fe6da95fdc1cf552..c581842589a1ed0810c8e01dec132967a954214b 100644 (file)
@@ -1444,7 +1444,7 @@ function edit_form($table, $fields, $row, $update) {
                        $value = ($row !== null
                                ? ($row[$name] != "" && $jush == "sql" && preg_match("~enum|set~", $field["type"])
                                        ? (is_array($row[$name]) ? array_sum($row[$name]) : +$row[$name])
-                                       : $row[$name]
+                                       : (is_bool($row[$name]) ? +$row[$name] : $row[$name])
                                )
                                : (!$update && $field["auto_increment"]
                                        ? ""
index 03e894845ca91b6474ce8754c1c93e7973be7381..3349181a47091ca5e362ff0de264485498126ad3 100644 (file)
@@ -3,6 +3,7 @@ Skip date columns for non-date values in search anywhere
 Add DB version to comment in export
 Support PHP 8 in create table (regression from 4.7.9)
 MySQL 8: Fix EXPLAIN in SQL command
+PostgreSQL PDO: Do not select NULL function for false values in edit
 
 Adminer 4.7.9 (released 2021-02-07):
 Fix XSS in browsers which don't encode URL parameters (bug #775, regression from 4.7.0)