From: Jakub Vrana Date: Tue, 9 Feb 2021 09:08:27 +0000 (+0100) Subject: PostgreSQL: Fix displaying NULL bytea fields X-Git-Tag: v4.8.0~25 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=7a89b5a037931962e9bcee58396b943a991720ed;p=adminer.git PostgreSQL: Fix displaying NULL bytea fields --- diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index eaa2865d..add56272 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -40,7 +40,7 @@ if (isset($_GET["pgsql"])) { } function value($val, $field) { - return ($field["type"] == "bytea" ? pg_unescape_bytea($val) : $val); + return ($field["type"] == "bytea" && $val !== null ? pg_unescape_bytea($val) : $val); } function quoteBinary($string) { diff --git a/changes.txt b/changes.txt index a3975510..f1c43217 100644 --- a/changes.txt +++ b/changes.txt @@ -9,6 +9,7 @@ PostgreSQL: Create PRIMARY KEY for auto increment columns PostgreSQL: Avoid exporting empty sequence last value (bug #768) PostgreSQL: Do not show triggers from other schemas (PR #412) PostgreSQL: Fix multi-parameter functions in default values (bug #736) +PostgreSQL: Fix displaying NULL bytea fields PostgreSQL PDO: Do not select NULL function for false values in edit Oracle: Alter indexes Oracle: Count tables