]> granicus.if.org Git - php/commitdiff
Fixed #6627. Wrong logic...
authorJouni Ahto <jah@php.net>
Sat, 9 Sep 2000 09:40:16 +0000 (09:40 +0000)
committerJouni Ahto <jah@php.net>
Sat, 9 Sep 2000 09:40:16 +0000 (09:40 +0000)
ext/pgsql/pgsql.c

index f65a80dee9d24083eefc1cffc914b318445382b7..947fd2a0094ec1f16e81c9f8bd2141ecdaa59261 100644 (file)
@@ -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);
                        }