summaryrefslogtreecommitdiff
path: root/ext/pdo_oci/oci_statement.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_oci/oci_statement.c')
-rw-r--r--ext/pdo_oci/oci_statement.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c
index 79733c2c57..b983f20116 100644
--- a/ext/pdo_oci/oci_statement.c
+++ b/ext/pdo_oci/oci_statement.c
@@ -221,7 +221,9 @@ static sb4 oci_bind_input_cb(dvoid *ctx, OCIBind *bindp, ub4 iter, ub4 index, dv
*alenp = -1;
} else if (!P->thing) {
/* regular string bind */
- convert_to_string(parameter);
+ if (!try_convert_to_string(parameter)) {
+ return OCI_ERROR;
+ }
*bufpp = Z_STRVAL_P(parameter);
*alenp = (ub4) Z_STRLEN_P(parameter);
}
@@ -260,8 +262,7 @@ static sb4 oci_bind_output_cb(dvoid *ctx, OCIBind *bindp, ub4 iter, ub4 index, d
return OCI_CONTINUE;
}
- convert_to_string(parameter);
- zval_ptr_dtor_str(parameter);
+ zval_ptr_dtor(parameter);
Z_STR_P(parameter) = zend_string_alloc(param->max_value_len, 1);
P->used_for_output = 1;