From: Antony Dovgal Date: Tue, 31 Jul 2007 21:09:01 +0000 (+0000) Subject: MFH: missing part of the fix for bug #42134 X-Git-Tag: php-5.2.4RC1~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=287ac21d5fecd867c32da884924665e138523af2;p=php MFH: missing part of the fix for bug #42134 --- diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index 009ef4d153..834cf99dda 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -1583,19 +1583,28 @@ PHP_FUNCTION(oci_error) RETURN_FALSE; } #endif - } else { - connection = (php_oci_connection *) zend_fetch_resource(&arg TSRMLS_CC, -1, NULL, NULL, 1, le_connection); - - if (connection) { - errh = connection->err; - error = connection->errcode; - } + goto go_out; + } + + connection = (php_oci_connection *) zend_fetch_resource(&arg TSRMLS_CC, -1, NULL, NULL, 1, le_connection); + if (connection) { + errh = connection->err; + error = connection->errcode; + goto go_out; + } + + connection = (php_oci_connection *) zend_fetch_resource(&arg TSRMLS_CC, -1, NULL, NULL, 1, le_pconnection); + if (connection) { + errh = connection->err; + error = connection->errcode; + goto go_out; } } else { errh = OCI_G(err); error = OCI_G(errcode); } +go_out: if (error == OCI_SUCCESS) { /* no error set in the handle */ RETURN_FALSE; }