From: Yasuo Ohgaki Date: Mon, 8 Apr 2002 00:50:44 +0000 (+0000) Subject: Return proper result. X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~801 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d48177f373bb484339fbeda5235ce6b32d44427;p=php Return proper result. --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 2fc44c5c70..59281364eb 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2679,12 +2679,12 @@ PHP_FUNCTION(pg_result_status) pgsql_result = pg_result->result; if (result_type == PGSQL_STATUS_LONG) { - RETURN_STRING(PQcmdStatus(pgsql_result), 1); - } - else if (result_type == PGSQL_STATUS_STRING) { status = PQresultStatus(pgsql_result); RETURN_LONG((int)status); } + else if (result_type == PGSQL_STATUS_STRING) { + RETURN_STRING(PQcmdStatus(pgsql_result), 1); + } else { php_error(E_WARNING, "%s() expects optional 2nd parameter to be PGSQL_STATUS_LONG or PGSQL_STATUS_STRING", get_active_function_name(TSRMLS_C));