From: Romolo Manfredini Date: Sat, 24 Mar 2001 18:36:43 +0000 (+0000) Subject: Solved bugs #9746 and #9937, pg_close was closing twice the default conn. X-Git-Tag: php-4.0.6RC1~578 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a102a46693cb3511bf35747dab9687ea02387fb;p=php Solved bugs #9746 and #9937, pg_close was closing twice the default conn. --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 4e9755bfea..748fc80bc7 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -531,7 +531,8 @@ PHP_FUNCTION(pg_close) 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; }