summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/oci8/oci8.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index d9856ffc1e..bda502a5fd 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2196,7 +2196,7 @@ static int oci_lobgetlen(oci_connection *connection, oci_descriptor *mydescr, ub
}
}
- oci_debug("OCILobGetLen: len=%d",loblen);
+ oci_debug("OCILobGetLen: len=%d",*loblen);
return 0;
}
@@ -4221,6 +4221,7 @@ PHP_FUNCTION(oci_lob_write)
}
if (zend_get_parameters_ex(2, &data, &length) == SUCCESS) {
+ convert_to_string_ex(data);
convert_to_long_ex(length);
write_length = Z_LVAL_PP(length);
} else if (zend_get_parameters_ex(1, &data) == SUCCESS) {
@@ -4389,7 +4390,7 @@ PHP_FUNCTION(oci_lob_truncate)
convert_to_long_ex(length);
trim_length = Z_LVAL_PP(length);
} else {
- WRONG_PARAM_COUNT;
+ trim_length = 0;
}
if (trim_length < 0) {