mirror of
https://github.com/php/php-src.git
synced 2024-11-26 19:33:55 +08:00
Add a little more fault tolerance for pg_host, pg_tty and more.
This commit is contained in:
parent
ddee00da0e
commit
448dbd72cd
@ -721,6 +721,9 @@ void php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
|
||||
|
||||
ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, "PostgreSQL link", le_link, le_plink);
|
||||
|
||||
if (PQstatus(pgsql) != CONNECTION_OK) {
|
||||
PQreset(pgsql);
|
||||
}
|
||||
switch(entry_type) {
|
||||
case PHP_PG_DBNAME:
|
||||
Z_STRVAL_P(return_value) = PQdb(pgsql);
|
||||
|
Loading…
Reference in New Issue
Block a user