Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ui/include/db.inc.php')
-rw-r--r--ui/include/db.inc.php11
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;