summaryrefslogtreecommitdiff
path: root/ext/oci8
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-07-31 21:08:38 +0000
committerAntony Dovgal <tony2001@php.net>2007-07-31 21:08:38 +0000
commitc26725cc1a47dd7624f159ae723f9d14c879d51e (patch)
tree24ea093f60e0f89b4691226dbed96b3f0c563566 /ext/oci8
parentac1452b21fb03dd8233b52a81dfc1006ca4f1852 (diff)
downloadphp-git-c26725cc1a47dd7624f159ae723f9d14c879d51e.tar.gz
missing part of the fix for bug #42134
Diffstat (limited to 'ext/oci8')
-rw-r--r--ext/oci8/oci8_interface.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c
index 823975f61b..192e912529 100644
--- a/ext/oci8/oci8_interface.c
+++ b/ext/oci8/oci8_interface.c
@@ -1622,19 +1622,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;
}