]> granicus.if.org Git - php/commitdiff
Fix by Sterling Hughes. Fixes bugs: #10939, #10756, #10324
authorfoobar <sniper@php.net>
Sun, 27 May 2001 23:26:58 +0000 (23:26 +0000)
committerfoobar <sniper@php.net>
Sun, 27 May 2001 23:26:58 +0000 (23:26 +0000)
ext/pgsql/pgsql.c

index fac6baef9fc42cfcc327351ab8bf5d3334f83030..3e193254c093d2b1ef8d5e78157c737e6c4d1719 100644 (file)
@@ -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;