summaryrefslogtreecommitdiff
path: root/ext/oci8/oci8_statement.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/oci8/oci8_statement.c')
-rw-r--r--ext/oci8/oci8_statement.c190
1 files changed, 95 insertions, 95 deletions
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c
index 1002b4885e..ce41ef2397 100644
--- a/ext/oci8/oci8_statement.c
+++ b/ext/oci8/oci8_statement.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 6 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
+----------------------------------------------------------------------+
@@ -41,7 +41,7 @@
#include "php_oci8.h"
#include "php_oci8_int.h"
-/* {{{ php_oci_statement_create()
+/* {{{ php_oci_statement_create()
Create statemend handle and allocate necessary resources */
php_oci_statement *php_oci_statement_create (php_oci_connection *connection, zstr query, int query_len, zend_uchar type TSRMLS_DC)
{
@@ -62,7 +62,7 @@ php_oci_statement *php_oci_statement_create (php_oci_connection *connection, zst
if (query_len > 0) {
#if HAVE_OCI_STMT_PREPARE2
- PHP_OCI_CALL_RETURN(connection->errcode, OCIStmtPrepare2,
+ PHP_OCI_CALL_RETURN(connection->errcode, OCIStmtPrepare2,
(
connection->svc,
&(statement->stmt),
@@ -126,7 +126,7 @@ php_oci_statement *php_oci_statement_create (php_oci_connection *connection, zst
/* {{{ php_oci_statement_set_prefetch()
Set prefetch buffer size for the statement (we're assuming that one row is ~1K sized) */
int php_oci_statement_set_prefetch(php_oci_statement *statement, long size TSRMLS_DC)
-{
+{
ub4 prefetch = size;
if (size < 1) {
@@ -146,7 +146,7 @@ int php_oci_statement_set_prefetch(php_oci_statement *statement, long size TSRML
}
/* }}} */
-/* {{{ php_oci_statement_fetch()
+/* {{{ php_oci_statement_fetch()
Fetch a row from the statement */
int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows TSRMLS_DC)
{
@@ -194,7 +194,7 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows TSRMLS_DC)
while (statement->errcode == OCI_NEED_DATA) {
if (piecewisecols) {
PHP_OCI_CALL_RETURN(statement->errcode,
- OCIStmtGetPieceInfo,
+ OCIStmtGetPieceInfo,
(
statement->stmt,
statement->err,
@@ -237,7 +237,7 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows TSRMLS_DC)
}
}
- PHP_OCI_CALL_RETURN(statement->errcode, OCIStmtFetch, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT));
+ PHP_OCI_CALL_RETURN(statement->errcode, OCIStmtFetch, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT));
if (piecewisecols) {
for (i = 0; i < statement->ncolumns; i++) {
@@ -279,7 +279,7 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows TSRMLS_DC)
}
/* }}} */
-/* {{{ php_oci_statement_get_column()
+/* {{{ php_oci_statement_get_column()
Get column from the result set */
php_oci_out_column *php_oci_statement_get_column(php_oci_statement *statement, long column_index, zstr column_name, int column_name_len TSRMLS_DC)
{
@@ -331,7 +331,7 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf
php_oci_statement *nested_stmt;
TSRMLS_FETCH();
- nested_stmt = php_oci_statement_create(outcol->statement->connection, NULL_ZSTR, 0, 0 TSRMLS_CC);
+ nested_stmt = php_oci_statement_create(outcol->statement->connection, NULL_ZSTR, 0, 0 TSRMLS_CC);
if (!nested_stmt) {
return OCI_ERROR;
}
@@ -349,7 +349,7 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf
}
break;
case SQLT_RDD:
- case SQLT_BLOB:
+ case SQLT_BLOB:
case SQLT_CLOB:
case SQLT_BFILE: {
php_oci_descriptor *descr;
@@ -385,7 +385,7 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf
}
/* }}} */
-/* {{{ php_oci_statement_execute()
+/* {{{ php_oci_statement_execute()
Execute statement */
int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
{
@@ -429,8 +429,8 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
iters = 1;
}
- if (statement->last_query) {
- /* if we execute refcursors we don't have a query and
+ if (statement->last_query) {
+ /* if we execute refcursors we don't have a query and
we don't want to execute!!! */
if (statement->binds) {
@@ -472,7 +472,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
if (statement->errcode != OCI_SUCCESS) {
statement->errcode = php_oci_error(statement->err, statement->errcode TSRMLS_CC);
PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode);
- return 1;
+ return 1;
}
statement->ncolumns = colcount;
@@ -484,7 +484,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
efree(statement->columns);
/* out of memory */
return 1;
- }
+ }
/* get column */
PHP_OCI_CALL_RETURN(statement->errcode, OCIParamGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, statement->err, (dvoid**)&param, counter));
@@ -515,7 +515,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
return 1;
}
- /* get character set id */
+ /* get character set id */
PHP_OCI_CALL_RETURN(statement->errcode, OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid *)&outcol->charset_id, (ub4 *)0, OCI_ATTR_CHARSET_ID, statement->err));
if (statement->errcode != OCI_SUCCESS) {
@@ -532,7 +532,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM));
statement->errcode = php_oci_error(statement->err, statement->errcode TSRMLS_CC);
PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode);
- return 1;
+ return 1;
}
outcol->storage_size4 = outcol->data_size;
@@ -597,9 +597,9 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
dynamic = OCI_DYNAMIC_FETCH;
break;
- case SQLT_RDD: /* ROWID */
- case SQLT_BLOB: /* binary LOB */
- case SQLT_CLOB: /* character LOB */
+ case SQLT_RDD: /* ROWID */
+ case SQLT_BLOB: /* binary LOB */
+ case SQLT_CLOB: /* character LOB */
case SQLT_BFILE: /* binary file LOB */
outcol->statement = statement; /* parent handle */
@@ -662,7 +662,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
}
if (dynamic == OCI_DYNAMIC_FETCH) {
- PHP_OCI_CALL_RETURN(statement->errcode,
+ PHP_OCI_CALL_RETURN(statement->errcode,
OCIDefineByPos,
(
statement->stmt, /* IN/OUT handle to the requested SQL query */
@@ -680,10 +680,10 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
);
} else {
- PHP_OCI_CALL_RETURN(statement->errcode,
+ PHP_OCI_CALL_RETURN(statement->errcode,
OCIDefineByPos,
(
- statement->stmt, /* IN/OUT handle to the requested SQL query */
+ statement->stmt, /* IN/OUT handle to the requested SQL query */
(OCIDefine **)&outcol->oci_define, /* IN/OUT pointer to a pointer to a define handle */
statement->err, /* IN/OUT An error handle */
counter, /* IN position in the select list */
@@ -708,11 +708,11 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
/* additional OCIDefineDynamic() call */
switch (outcol->data_type) {
case SQLT_RSET:
- case SQLT_RDD:
- case SQLT_BLOB:
+ case SQLT_RDD:
+ case SQLT_BLOB:
case SQLT_CLOB:
case SQLT_BFILE:
- PHP_OCI_CALL_RETURN(statement->errcode,
+ PHP_OCI_CALL_RETURN(statement->errcode,
OCIDefineDynamic,
(
outcol->oci_define,
@@ -731,7 +731,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
}
/* }}} */
-/* {{{ php_oci_statement_cancel()
+/* {{{ php_oci_statement_cancel()
Cancel statement */
int php_oci_statement_cancel(php_oci_statement *statement TSRMLS_DC)
{
@@ -740,11 +740,11 @@ int php_oci_statement_cancel(php_oci_statement *statement TSRMLS_DC)
} /* }}} */
-/* {{{ php_oci_statement_free()
+/* {{{ php_oci_statement_free()
Destroy statement handle and free associated resources */
void php_oci_statement_free(php_oci_statement *statement TSRMLS_DC)
{
- if (statement->stmt) {
+ if (statement->stmt) {
#if HAVE_OCI_STMT_PREPARE2
if (statement->last_query_len) { /* FIXME: magical */
PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, statement->err, NULL, 0, statement->errcode ? OCI_STRLS_CACHE_DELETE : OCI_DEFAULT));
@@ -791,7 +791,7 @@ void php_oci_statement_free(php_oci_statement *statement TSRMLS_DC)
OCI_G(num_statements)--;
} /* }}} */
-/* {{{ php_oci_bind_pre_exec()
+/* {{{ php_oci_bind_pre_exec()
Helper function */
int php_oci_bind_pre_exec(void *data TSRMLS_DC)
{
@@ -799,13 +799,13 @@ int php_oci_bind_pre_exec(void *data TSRMLS_DC)
/* reset all bind stuff to a normal state..-. */
- bind->indicator = 0;
+ bind->indicator = 0;
return 0;
}
/* }}} */
-/* {{{ php_oci_bind_post_exec()
+/* {{{ php_oci_bind_post_exec()
Helper function */
int php_oci_bind_post_exec(void *data TSRMLS_DC)
{
@@ -933,7 +933,7 @@ int php_oci_bind_post_exec(void *data TSRMLS_DC)
}
/* }}} */
-/* {{{ php_oci_bind_by_name()
+/* {{{ php_oci_bind_by_name()
Bind zval to the given placeholder */
int php_oci_bind_by_name(php_oci_statement *statement, zstr name, int name_len, zval* var, long maxlength, long type, zend_uchar uni_type TSRMLS_DC)
{
@@ -941,11 +941,11 @@ int php_oci_bind_by_name(php_oci_statement *statement, zstr name, int name_len,
php_oci_collection *bind_collection = NULL;
#endif
php_oci_descriptor *bind_descriptor = NULL;
- php_oci_statement *bind_statement = NULL;
- dvoid *oci_desc = NULL;
- /* dvoid *php_oci_collection = NULL; */
- OCIStmt *oci_stmt = NULL;
- dvoid *bind_data = NULL;
+ php_oci_statement *bind_statement = NULL;
+ dvoid *oci_desc = NULL;
+ /* dvoid *php_oci_collection = NULL; */
+ OCIStmt *oci_stmt = NULL;
+ dvoid *bind_data = NULL;
php_oci_bind bind, *old_bind, *bindp;
int mode = OCI_DATA_AT_EXEC;
sb4 value_sz = -1;
@@ -1008,7 +1008,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, zstr name, int name_len,
case SQLT_BIN:
case SQLT_LNG:
case SQLT_AFC:
- case SQLT_CHR: /* SQLT_CHAR is the default value when type was not specified */
+ case SQLT_CHR: /* SQLT_CHR is the default value when type was not specified */
if (Z_TYPE_P(var) != IS_NULL) {
convert_to_text(var);
}
@@ -1046,7 +1046,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, zstr name, int name_len,
break;
}
- if (value_sz == 0) {
+ if (value_sz == 0) {
value_sz = 1;
}
@@ -1069,25 +1069,25 @@ int php_oci_bind_by_name(php_oci_statement *statement, zstr name, int name_len,
bindp->statement = oci_stmt;
bindp->parent_statement = statement;
bindp->zval = var;
- zval_add_ref(&var);
+ zval_add_ref(&var);
- PHP_OCI_CALL_RETURN(statement->errcode,
+ PHP_OCI_CALL_RETURN(statement->errcode,
OCIBindByName,
(
- statement->stmt, /* statement handle */
- (OCIBind **)&bindp->bind, /* bind hdl (will alloc) */
- statement->err, /* error handle */
- (text*) name.s, /* placeholder name */
- USTR_BYTES(uni_type, name_len), /* placeholder length */
- (dvoid *)bind_data, /* in/out data */
+ statement->stmt, /* statement handle */
+ (OCIBind **)&bindp->bind, /* bind hdl (will alloc) */
+ statement->err, /* error handle */
+ (text*) name.s, /* placeholder name */
+ USTR_BYTES(uni_type, name_len), /* placeholder length */
+ (dvoid *)bind_data, /* in/out data */
TEXT_BYTES(value_sz), /* PHP_OCI_MAX_DATA_SIZE, */ /* max size of input/output data */
- (ub2)type, /* in/out data type */
- (dvoid *)&bindp->indicator, /* indicator (ignored) */
- (ub2 *)0, /* size array (ignored) */
- (ub2 *)&bindp->retcode, /* return code (ignored) */
- (ub4)0, /* maxarr_len (PL/SQL only?) */
- (ub4 *)0, /* actual array size (PL/SQL only?) */
- mode /* mode */
+ (ub2)type, /* in/out data type */
+ (dvoid *)&bindp->indicator, /* indicator (ignored) */
+ (ub2 *)0, /* size array (ignored) */
+ (ub2 *)&bindp->retcode, /* return code (ignored) */
+ (ub4)0, /* maxarr_len (PL/SQL only?) */
+ (ub4 *)0, /* actual array size (PL/SQL only?) */
+ mode /* mode */
)
);
@@ -1098,7 +1098,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, zstr name, int name_len,
}
if (mode == OCI_DATA_AT_EXEC) {
- PHP_OCI_CALL_RETURN(statement->errcode, OCIBindDynamic,
+ PHP_OCI_CALL_RETURN(statement->errcode, OCIBindDynamic,
(
bindp->bind,
statement->err,
@@ -1119,7 +1119,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, zstr name, int name_len,
#ifdef PHP_OCI8_HAVE_COLLECTIONS
if (type == SQLT_NTY) {
/* Bind object */
- PHP_OCI_CALL_RETURN(statement->errcode, OCIBindObject,
+ PHP_OCI_CALL_RETURN(statement->errcode, OCIBindObject,
(
bindp->bind,
statement->err,
@@ -1142,17 +1142,17 @@ int php_oci_bind_by_name(php_oci_statement *statement, zstr name, int name_len,
return 0;
} /* }}} */
-/* {{{ php_oci_bind_in_callback()
+/* {{{ php_oci_bind_in_callback()
Callback used when binding LOBs and VARCHARs */
sb4 php_oci_bind_in_callback(
- dvoid *ictxp, /* context pointer */
- OCIBind *bindp, /* bind handle */
- ub4 iter, /* 0-based execute iteration value */
- ub4 index, /* index of current array for PL/SQL or row index for SQL */
- dvoid **bufpp, /* pointer to data */
- ub4 *alenp, /* size after value/piece has been read */
- ub1 *piecep, /* which piece */
- dvoid **indpp) /* indicator value */
+ dvoid *ictxp, /* context pointer */
+ OCIBind *bindp, /* bind handle */
+ ub4 iter, /* 0-based execute iteration value */
+ ub4 index, /* index of current array for PL/SQL or row index for SQL */
+ dvoid **bufpp, /* pointer to data */
+ ub4 *alenp, /* size after value/piece has been read */
+ ub1 *piecep, /* which piece */
+ dvoid **indpp) /* indicator value */
{
php_oci_bind *phpbind;
zval *val;
@@ -1169,9 +1169,9 @@ sb4 php_oci_bind_in_callback(
*bufpp = 0;
*alenp = -1;
*indpp = (dvoid *)&phpbind->indicator;
- } else if ((phpbind->descriptor == 0) && (phpbind->statement == 0)) {
+ } else if ((phpbind->descriptor == 0) && (phpbind->statement == 0)) {
/* "normal string bind */
- convert_to_text(val);
+ convert_to_text(val);
if (UG(unicode)) {
*bufpp = Z_UNIVAL_P(val).v;
@@ -1186,7 +1186,7 @@ sb4 php_oci_bind_in_callback(
*bufpp = phpbind->statement;
*alenp = -1; /* seems to be allright */
*indpp = (dvoid *)&phpbind->indicator;
- } else {
+ } else {
/* descriptor bind */
*bufpp = phpbind->descriptor;
*alenp = -1; /* seems to be allright */
@@ -1201,15 +1201,15 @@ sb4 php_oci_bind_in_callback(
/* {{{ php_oci_bind_out_callback()
Callback used when binding LOBs and VARCHARs */
sb4 php_oci_bind_out_callback(
- dvoid *octxp, /* context pointer */
- OCIBind *bindp, /* bind handle */
- ub4 iter, /* 0-based execute iteration value */
- ub4 index, /* index of current array for PL/SQL or row index for SQL */
- dvoid **bufpp, /* pointer to data */
- ub4 **alenpp, /* size after value/piece has been read */
- ub1 *piecep, /* which piece */
- dvoid **indpp, /* indicator value */
- ub2 **rcodepp) /* return code */
+ dvoid *octxp, /* context pointer */
+ OCIBind *bindp, /* bind handle */
+ ub4 iter, /* 0-based execute iteration value */
+ ub4 index, /* index of current array for PL/SQL or row index for SQL */
+ dvoid **bufpp, /* pointer to data */
+ ub4 **alenpp, /* size after value/piece has been read */
+ ub1 *piecep, /* which piece */
+ dvoid **indpp, /* indicator value */
+ ub2 **rcodepp) /* return code */
{
php_oci_bind *phpbind;
zval *val;
@@ -1243,7 +1243,7 @@ sb4 php_oci_bind_out_callback(
*rcodepp = &phpbind->retcode;
*indpp = &phpbind->indicator;
retval = OCI_CONTINUE;
- } else {
+ } else {
if (UG(unicode)) {
convert_to_unicode(val);
zval_dtor(val);
@@ -1251,13 +1251,13 @@ sb4 php_oci_bind_out_callback(
Z_UNILEN_P(val) = PHP_OCI_PIECE_SIZE; /* 64K-1 is max XXX */
Z_UNIVAL_P(val).v = ecalloc(1, UBYTES(Z_UNILEN_P(phpbind->zval) + 1));
- *alenpp = (ub4*) &Z_UNILEN_P(phpbind->zval);
+ *alenpp = (ub4*) &Z_UNILEN_P(phpbind->zval);
*bufpp = Z_UNIVAL_P(phpbind->zval).v;
*piecep = OCI_ONE_PIECE;
*rcodepp = &phpbind->retcode;
*indpp = &phpbind->indicator;
retval = OCI_CONTINUE;
- } else {
+ } else {
convert_to_string(val);
zval_dtor(val);
@@ -1265,7 +1265,7 @@ sb4 php_oci_bind_out_callback(
Z_STRVAL_P(val) = ecalloc(1, Z_STRLEN_P(phpbind->zval) + 1);
/* XXX we assume that zend-zval len has 4 bytes */
- *alenpp = (ub4*) &Z_STRLEN_P(phpbind->zval);
+ *alenpp = (ub4*) &Z_STRLEN_P(phpbind->zval);
*bufpp = Z_STRVAL_P(phpbind->zval);
*piecep = OCI_ONE_PIECE;
*rcodepp = &phpbind->retcode;
@@ -1277,7 +1277,7 @@ sb4 php_oci_bind_out_callback(
}
/* }}} */
-/* {{{ php_oci_statement_get_column_helper()
+/* {{{ php_oci_statement_get_column_helper()
Helper function to get column by name and index */
php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAMETERS, int need_data)
{
@@ -1337,7 +1337,7 @@ int php_oci_statement_get_type(php_oci_statement *statement, ub2 *type TSRMLS_DC
return 0;
} /* }}} */
-/* {{{ php_oci_statement_get_numrows()
+/* {{{ php_oci_statement_get_numrows()
Get the number of rows fetched to the clientside (NOT the number of rows in the result set) */
int php_oci_statement_get_numrows(php_oci_statement *statement, ub4 *numrows TSRMLS_DC)
{
@@ -1358,7 +1358,7 @@ int php_oci_statement_get_numrows(php_oci_statement *statement, ub4 *numrows TSR
return 0;
} /* }}} */
-/* {{{ php_oci_bind_array_by_name()
+/* {{{ php_oci_bind_array_by_name()
Bind arrays to PL/SQL types */
int php_oci_bind_array_by_name(php_oci_statement *statement, zstr name, int name_len, zval* var, long max_table_length, long maxlength, long type, zend_uchar uni_type TSRMLS_DC)
{
@@ -1423,15 +1423,15 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, zstr name, int name
bindp->array.type = type;
zval_add_ref(&var);
- PHP_OCI_CALL_RETURN(statement->errcode,
- OCIBindByName,
+ PHP_OCI_CALL_RETURN(statement->errcode,
+ OCIBindByName,
(
statement->stmt,
(OCIBind **)&bindp->bind,
statement->err,
(text *)name.s,
USTR_BYTES(uni_type, name_len),
- (dvoid *) bindp->array.elements,
+ (dvoid *) bindp->array.elements,
(sb4) bind->array.max_length,
type,
(dvoid *)bindp->array.indicators,
@@ -1454,7 +1454,7 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, zstr name, int name
return 0;
} /* }}} */
-/* {{{ php_oci_bind_array_helper_string()
+/* {{{ php_oci_bind_array_helper_string()
Bind arrays to PL/SQL types */
php_oci_bind *php_oci_bind_array_helper_string(zval* var, long max_table_length, long maxlength TSRMLS_DC)
{
@@ -1489,7 +1489,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval* var, long max_table_length,
bind->array.max_length = TEXT_BYTES(maxlength);
bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0);
memset(bind->array.element_lengths, 0, max_table_length * sizeof(ub2));
- bind->array.indicators = safe_emalloc(max_table_length, sizeof(sb2), 0);
+ bind->array.indicators = safe_emalloc(max_table_length, sizeof(sb2), 0);
memset(bind->array.indicators, 0, max_table_length*sizeof(sb2));
zend_hash_internal_pointer_reset(hash);
@@ -1497,7 +1497,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval* var, long max_table_length,
for (i = 0; i < bind->array.current_length; i++) {
if (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE) {
convert_to_text_ex(entry);
- bind->array.element_lengths[i] = TEXT_BYTES(Z_UNILEN_PP(entry));
+ bind->array.element_lengths[i] = TEXT_BYTES(Z_UNILEN_PP(entry));
if (Z_UNILEN_PP(entry) == 0) {
bind->array.indicators[i] = -1;
}
@@ -1510,7 +1510,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval* var, long max_table_length,
zend_hash_internal_pointer_reset(hash);
for (i = 0; i < max_table_length; i++) {
if ((i < bind->array.current_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) {
- int element_length;
+ int element_length;
convert_to_text_ex(entry);
element_length = (maxlength > Z_UNILEN_PP(entry)) ? Z_UNILEN_PP(entry) : maxlength;
@@ -1532,7 +1532,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval* var, long max_table_length,
return bind;
} /* }}} */
-/* {{{ php_oci_bind_array_helper_number()
+/* {{{ php_oci_bind_array_helper_number()
Bind arrays to PL/SQL types */
php_oci_bind *php_oci_bind_array_helper_number(zval* var, long max_table_length TSRMLS_DC)
{
@@ -1570,7 +1570,7 @@ php_oci_bind *php_oci_bind_array_helper_number(zval* var, long max_table_length
return bind;
} /* }}} */
-/* {{{ php_oci_bind_array_helper_double()
+/* {{{ php_oci_bind_array_helper_double()
Bind arrays to PL/SQL types */
php_oci_bind *php_oci_bind_array_helper_double(zval* var, long max_table_length TSRMLS_DC)
{
@@ -1608,7 +1608,7 @@ php_oci_bind *php_oci_bind_array_helper_double(zval* var, long max_table_length
return bind;
} /* }}} */
-/* {{{ php_oci_bind_array_helper_date()
+/* {{{ php_oci_bind_array_helper_date()
Bind arrays to PL/SQL types */
php_oci_bind *php_oci_bind_array_helper_date(zval* var, long max_table_length, php_oci_connection *connection TSRMLS_DC)
{