summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2001-06-29 03:12:06 +0000
committerfoobar <sniper@php.net>2001-06-29 03:12:06 +0000
commitbc3482d65f23df7de4ae1dc289a52dbf05d40c90 (patch)
tree3c7aac58c27cc816a29fdef091fd1ca37c35d23e /ext/pgsql/pgsql.c
parent5c8035e34654443a39bfcfd61743048f8bd1cd63 (diff)
downloadphp-git-bc3482d65f23df7de4ae1dc289a52dbf05d40c90.tar.gz
Fixed bug: #11728. Error message was cleared before outputted in pg_pconnect()
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index c1bb10e486..fd959d560d 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -434,10 +434,10 @@ void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
pgsql=PQsetdb(host,port,options,tty,dbname);
}
if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) {
+ php_error(E_WARNING,"Unable to connect to PostgreSQL server: %s",PQerrorMessage(pgsql));
if (pgsql) {
PQfinish(pgsql);
}
- php_error(E_WARNING,"Unable to connect to PostgreSQL server: %s",PQerrorMessage(pgsql));
efree(hashed_details);
RETURN_FALSE;
}