From 20fe0a568501bc8ec52f78cc3bf9a7c105e92b35 Mon Sep 17 00:00:00 2001 From: Jouni Ahto Date: Sat, 9 Sep 2000 09:40:16 +0000 Subject: [PATCH] Fixed #6627. Wrong logic... --- ext/pgsql/pgsql.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index f65a80dee9..947fd2a009 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -940,7 +940,8 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) if (PQgetisnull(pgsql_result, Z_LVAL_PP(row), i)) { if (result_type & PGSQL_NUM) { add_index_unset(return_value, i); - } else { + } + if (result_type & PGSQL_ASSOC) { field_name = PQfname(pgsql_result, i); add_assoc_unset(return_value, field_name); } -- 2.50.1