mirror of
https://github.com/php/php-src.git
synced 2024-11-26 19:33:55 +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);
|
pgsql=PQsetdb(host,port,options,tty,dbname);
|
||||||
}
|
}
|
||||||
if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) {
|
if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) {
|
||||||
|
php_error(E_WARNING,"Unable to connect to PostgreSQL server: %s",PQerrorMessage(pgsql));
|
||||||
if (pgsql) {
|
if (pgsql) {
|
||||||
PQfinish(pgsql);
|
PQfinish(pgsql);
|
||||||
}
|
}
|
||||||
php_error(E_WARNING,"Unable to connect to PostgreSQL server: %s",PQerrorMessage(pgsql));
|
|
||||||
efree(hashed_details);
|
efree(hashed_details);
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user