summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-04-12 17:59:32 +0000
committerAntony Dovgal <tony2001@php.net>2006-04-12 17:59:32 +0000
commit2e461783d02366a5363e2cfb703b017d9bd55cba (patch)
treeff075e237f8bc96356e449a047174326531b77ed /ext
parenta6e4f11cb15945130aab46da0a39982a636ced57 (diff)
downloadphp-git-2e461783d02366a5363e2cfb703b017d9bd55cba.tar.gz
correct fix for bug #37055
Diffstat (limited to 'ext')
-rw-r--r--ext/oci8/oci8.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 868c40c482..f9f52de99f 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -541,6 +541,7 @@ PHP_MINIT_FUNCTION(oci)
REGISTER_LONG_CONSTANT("SQLT_FLT",SQLT_FLT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SQLT_UIN",SQLT_UIN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SQLT_LNG",SQLT_LNG, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_LBI",SQLT_LBI, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SQLT_ODT",SQLT_ODT, CONST_CS | CONST_PERSISTENT);
#if defined(HAVE_OCI_INSTANT_CLIENT) || (defined(OCI_MAJOR_VERSION) && OCI_MAJOR_VERSION > 10)
REGISTER_LONG_CONSTANT("SQLT_BDOUBLE",SQLT_BDOUBLE, CONST_CS | CONST_PERSISTENT);
@@ -1056,7 +1057,9 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
/* okay, the connection is open and the server is still alive */
connection->used_this_request = 1;
smart_str_free_ex(&hashed_details, 0);
- zend_list_addref(connection->rsrc_id);
+ if (zend_list_addref(connection->rsrc_id) == FAILURE) {
+ connection->rsrc_id = zend_list_insert(connection, le_pconnection);
+ }
return connection;
}
}