summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2002-04-08 00:50:44 +0000
committerYasuo Ohgaki <yohgaki@php.net>2002-04-08 00:50:44 +0000
commit7d48177f373bb484339fbeda5235ce6b32d44427 (patch)
treee003d07151e9c6110b89a2964796f412b8256f4c /ext/pgsql/pgsql.c
parent7770fd57101b7cc5a73e7d32d955763662cb5bf3 (diff)
downloadphp-git-7d48177f373bb484339fbeda5235ce6b32d44427.tar.gz
Return proper result.
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c6
1 files changed, 3 insertions, 3 deletions
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));