]> granicus.if.org Git - php/commitdiff
fix #32904 (pg_get_notify() ignores result_type parameter)
authorAntony Dovgal <tony2001@php.net>
Tue, 10 May 2005 20:13:24 +0000 (20:13 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 10 May 2005 20:13:24 +0000 (20:13 +0000)
ext/pgsql/pgsql.c

index 1d63ec264d1539b57814ac3556be898ada1caebb..cb16ff936fa7645a64209bd6074cc74ded2136b0 100644 (file)
@@ -4144,11 +4144,11 @@ PHP_FUNCTION(pg_get_notify)
                RETURN_FALSE;
        }
        array_init(return_value);
-       if (result_type & (PGSQL_NUM|PGSQL_BOTH)) {
+       if (result_type == PGSQL_NUM || result_type == PGSQL_BOTH) {
                add_index_string(return_value, 0, pgsql_notify->relname, 1);
                add_index_long(return_value, 1, pgsql_notify->be_pid);
        }
-       if (result_type & (PGSQL_ASSOC|PGSQL_BOTH)) {
+       if (result_type == PGSQL_ASSOC || result_type == PGSQL_BOTH) {
                add_assoc_string(return_value, "message", pgsql_notify->relname, 1);
                add_assoc_long(return_value, "pid", pgsql_notify->be_pid);
        }