diff options
| author | Romolo Manfredini <romolo@php.net> | 2001-03-30 07:36:21 +0000 |
|---|---|---|
| committer | Romolo Manfredini <romolo@php.net> | 2001-03-30 07:36:21 +0000 |
| commit | d7c3cd60bec568ed9a277be53f121c09db957878 (patch) | |
| tree | 23dc588516a38a9033a1261c02602c6f1d531db3 /ext/pgsql/pgsql.c | |
| parent | 00ff97638ecea831fe2be61a0cac8625c01c72c4 (diff) | |
| download | php-git-d7c3cd60bec568ed9a277be53f121c09db957878.tar.gz | |
pg_close was not closing the connection, making impossible to reopen it. Pls insert in 4.0.5
Diffstat (limited to 'ext/pgsql/pgsql.c')
| -rw-r--r-- | ext/pgsql/pgsql.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 1feab4199d..f8e415852c 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -501,8 +501,7 @@ PHP_FUNCTION(pg_pconnect) PHP_FUNCTION(pg_close) { zval **pgsql_link = NULL; - void *ptr; - int id, type; + int id; PGconn *pgsql; PGLS_FETCH(); @@ -528,15 +527,13 @@ PHP_FUNCTION(pg_close) if (id==-1) { /* explicit resource number */ zend_list_delete(Z_RESVAL_PP(pgsql_link)); - ptr = zend_list_find(Z_RESVAL_PP(pgsql_link),&type); - if (ptr && (type==le_link || type==le_plink)) { - RETURN_TRUE; - } } if (id!=-1 || (pgsql_link && Z_RESVAL_PP(pgsql_link)==PGG(default_link))) { - zend_list_delete(PGG(default_link)); + if (id!=-1) { + zend_list_delete(PGG(default_link)); + } PGG(default_link) = -1; } |
