summaryrefslogtreecommitdiff
path: root/ext/oci8/oci8.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-04-21 17:53:37 +0000
committerfoobar <sniper@php.net>2003-04-21 17:53:37 +0000
commitdd0228d3d8dc2d1e3d106f6e9222342dd4a02777 (patch)
treef4d7fcec01f71618167af5e06688377f1775e4db /ext/oci8/oci8.c
parent5a904d6ea81b61575462cc36bfc48b8eb711b14b (diff)
downloadphp-git-dd0228d3d8dc2d1e3d106f6e9222342dd4a02777.tar.gz
Fix bug #23198
Diffstat (limited to 'ext/oci8/oci8.c')
-rw-r--r--ext/oci8/oci8.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 23409ca51a..318ceb8566 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2154,7 +2154,7 @@ static oci_session *_oci_open_session(oci_server* server,char *username,char *pa
OCISvcCtx *svchp = 0;
char *hashed_details;
#ifdef HAVE_OCI9
- ub2 charsetid;
+ ub2 charsetid = 0;
#endif
TSRMLS_FETCH();
@@ -2218,9 +2218,10 @@ static oci_session *_oci_open_session(oci_server* server,char *username,char *pa
OCI(pEnv),
charset));
- session->charsetId = charsetid;
oci_debug("oci_do_connect: using charset id=%d",charsetid);
}
+
+ session->charsetId = charsetid;
/* create an environment using the character set id, Oracle 9i+ ONLY */
CALL_OCI(OCIEnvNlsCreate(
@@ -2648,6 +2649,7 @@ static void oci_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent,int exclu
username = Z_STRVAL_PP(userParam);
password = Z_STRVAL_PP(passParam);
dbname = Z_STRVAL_PP(dbParam);
+ charset = "";
} else if (zend_get_parameters_ex(2, &userParam, &passParam) == SUCCESS) {
convert_to_string_ex(userParam);
convert_to_string_ex(passParam);
@@ -2655,6 +2657,7 @@ static void oci_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent,int exclu
username = Z_STRVAL_PP(userParam);
password = Z_STRVAL_PP(passParam);
dbname = "";
+ charset = "";
} else {
WRONG_PARAM_COUNT;
}