mirror of
https://github.com/php/php-src.git
synced 2024-11-26 11:23:47 +08:00
Fixed bug: #11728. Error message was cleared before outputted in pg_pconnect()
This commit is contained in:
parent
5c8035e346
commit
bc3482d65f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user