PostgreSQL: Export false as 0 in PDO (bug #619)

This commit is contained in:
Jakub Vrana 2018-06-09 12:45:17 +02:00
parent b98d0bcc55
commit 2780eb01f5
2 changed files with 2 additions and 1 deletions

View file

@ -843,7 +843,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 === false ? 0 : $val)))
: "NULL"
);
}

View file

@ -12,6 +12,7 @@ MySQL: Order database names in MySQL 8 (bug #613)
PostgreSQL: Add SQL operator to search
PostgreSQL: Fix editing data in views (bug #605, regression from 4.6.0)
PostgreSQL: Do not cast date/time/number/uuid searches to text (bug #608)
PostgreSQL: Export false as 0 in PDO (bug #619)
MS SQL: Support port with sqlsrc
Editor: Do not check boolean checkboxes with false in PostgreSQL (bug #607)