]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL: Fix displaying NULL bytea fields
authorJakub Vrana <jakub@vrana.cz>
Tue, 9 Feb 2021 09:08:27 +0000 (10:08 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 9 Feb 2021 09:08:27 +0000 (10:08 +0100)
adminer/drivers/pgsql.inc.php
changes.txt

index eaa2865dcb3db42bd931df2fa510fd168124dd25..add56272e5a542ef8d63a5423337625e32e6953c 100644 (file)
@@ -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) {
index a3975510a405e6d8677e677b4a5d4c11e6882b7f..f1c43217aa88aba92c45a022449b60c742d7aa66 100644 (file)
@@ -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