summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2001-05-27 23:26:58 +0000
committerfoobar <sniper@php.net>2001-05-27 23:26:58 +0000
commit49d18d9f256f681d51341ccf77bebc4fece2b7b1 (patch)
tree0a99370be0c28debf33c49521abaa831898c285f /ext/pgsql/pgsql.c
parent02400e339bd605917c57582fe67acd60e961cc99 (diff)
downloadphp-git-49d18d9f256f681d51341ccf77bebc4fece2b7b1.tar.gz
Fix by Sterling Hughes. Fixes bugs: #10939, #10756, #10324
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index fac6baef9f..3e193254c0 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -172,9 +172,13 @@ _notice_handler(void *arg, const char *message)
static int _rollback_transactions(zend_rsrc_list_entry *rsrc)
{
- PGconn *link = (PGconn *)rsrc->ptr;
+ PGconn *link;
PGLS_FETCH();
+ if (rsrc->type != le_plink) return 0;
+
+ link = (PGconn *)rsrc->ptr;
+
PGG(ignore_notices) = 1;
PQexec(link,"BEGIN;ROLLBACK;");
PGG(ignore_notices) = 0;