mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Return proper result.
This commit is contained in:
parent
7770fd5710
commit
7d48177f37
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user