diff options
author | foobar <sniper@php.net> | 2001-06-29 03:12:06 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2001-06-29 03:12:06 +0000 |
commit | bc3482d65f23df7de4ae1dc289a52dbf05d40c90 (patch) | |
tree | 3c7aac58c27cc816a29fdef091fd1ca37c35d23e /ext/pgsql/pgsql.c | |
parent | 5c8035e34654443a39bfcfd61743048f8bd1cd63 (diff) | |
download | php-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.c | 2 |
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; } |