From bc3482d65f23df7de4ae1dc289a52dbf05d40c90 Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 29 Jun 2001 03:12:06 +0000 Subject: [PATCH] Fixed bug: #11728. Error message was cleared before outputted in pg_pconnect() --- ext/pgsql/pgsql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.50.1