From: Danny Heijl Date: Sat, 12 Aug 2000 12:03:41 +0000 (+0000) Subject: - The destructor for a connection resource closed the current X-Git-Tag: php-4.0.2RC1~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2acc8630fe7952e7d93262159f185211803b2a21;p=php - The destructor for a connection resource closed the current connection if the connection had been closed before (danny) --- diff --git a/ext/informix/ifx.ec b/ext/informix/ifx.ec index 7d501e5800..aa487a8aa8 100644 --- a/ext/informix/ifx.ec +++ b/ext/informix/ifx.ec @@ -284,8 +284,10 @@ static void _close_ifx_link(link) IFXLS_FETCH(); EXEC SQL SET CONNECTION :link; - EXEC SQL close database; - EXEC SQL DISCONNECT CURRENT; + if (ifx_check() >= 0) { + EXEC SQL close database; + EXEC SQL DISCONNECT CURRENT; + } efree(link); IFXG(num_links)--; } @@ -299,9 +301,10 @@ EXEC SQL END DECLARE SECTION; IFXLS_FETCH(); EXEC SQL SET CONNECTION :link; - EXEC SQL close database; - EXEC SQL DISCONNECT CURRENT; - + if (ifx_check() >= 0) { + EXEC SQL close database; + EXEC SQL DISCONNECT CURRENT; + } free(link); IFXG(num_persistent)--; IFXG(num_links)--;