summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2001-02-13 16:54:48 +0000
committerThies C. Arntzen <thies@php.net>2001-02-13 16:54:48 +0000
commit79a38a1c3ae108b8aaeaa040bc1ad24337a396e1 (patch)
tree839566337c602968f238ecc87f1fc030fb834815
parent9a631384f337e86317cb978b14342290b32d4761 (diff)
downloadphp-git-79a38a1c3ae108b8aaeaa040bc1ad24337a396e1.tar.gz
@- fixes PostgeSQL pg_connect() bug. We would sometimes close the default
@ link by acciedent. (Patch by: aja@nlgroup.ca)
-rw-r--r--ext/pgsql/pgsql.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 5ee40eebaf..ce4b7fc3b8 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -114,9 +114,10 @@ static void php_pgsql_set_default_link(int id)
{
PGLS_FETCH();
- if (PGG(default_link)!=-1) {
+ if ((PGG(default_link) != -1) && (PGG(default_link) != id)) {
zend_list_delete(PGG(default_link));
}
+
if (PGG(default_link) != id) {
PGG(default_link) = id;
zend_list_addref(id);