diff options
Diffstat (limited to 'ui/include/db.inc.php')
-rw-r--r-- | ui/include/db.inc.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ui/include/db.inc.php b/ui/include/db.inc.php index d02f01ce82d..ba4f00c7c65 100644 --- a/ui/include/db.inc.php +++ b/ui/include/db.inc.php @@ -401,7 +401,16 @@ function DBfetch($cursor, $convertNulls = true) { } break; case ZBX_DB_POSTGRESQL: - if (!$result = pg_fetch_assoc($cursor)) { + if ($result = pg_fetch_assoc($cursor)) { + $i = 0; + foreach ($result as &$value) { + if (pg_field_type($cursor, $i++) === 'bytea') { + $value = pg_unescape_bytea($value); + } + } + unset($value); + } + else { pg_free_result($cursor); } break; |