From: Antony Dovgal Date: Tue, 10 May 2005 20:13:24 +0000 (+0000) Subject: fix #32904 (pg_get_notify() ignores result_type parameter) X-Git-Tag: php-5.0.1b1~262 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38a7ef5fe613a254d048faf1204e15e80d37b4f6;p=php fix #32904 (pg_get_notify() ignores result_type parameter) --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 1d63ec264d..cb16ff936f 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -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); }