cvs: php4 /ext/pgsql pgsql.c

From: Date: Sun, 29 Apr 2001 17:33:11 +0000
Subject: cvs: php4 /ext/pgsql pgsql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5364@lists.php.net to get a copy of this message
zeev Sun Apr 29 10:33:11 2001 EDT Modified files: /php4/ext/pgsql pgsql.c Log: Accept the fix suggestion from bug #9562 Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.98 php4/ext/pgsql/pgsql.c:1.99 --- php4/ext/pgsql/pgsql.c:1.98 Sat Apr 14 03:32:14 2001 +++ php4/ext/pgsql/pgsql.c Sun Apr 29 10:33:11 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.98 2001/04/14 10:32:14 hirokawa Exp $ */ +/* $Id: pgsql.c,v 1.99 2001/04/29 17:33:11 zeev Exp $ */ #include <stdlib.h> @@ -376,6 +376,9 @@ pgsql=PQsetdb(host,port,options,tty,dbname); } if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) { + if (pgsql) { + PQfinish(pgsql); + } php_error(E_WARNING,"Unable to connect to PostgreSQL server: %s",PQerrorMessage(pgsql)); efree(hashed_details); RETURN_FALSE;

« previous php.cvs (#5364) next »