summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r--ext/mysqli/mysqli_api.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 1a7303c987..13d21e9312 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -899,7 +899,10 @@ PHP_FUNCTION(mysqli_stmt_execute)
if (!(stmt->param.is_null[i] = (Z_ISNULL_P(param)))) {
switch (stmt->stmt->params[i].buffer_type) {
case MYSQL_TYPE_VAR_STRING:
- convert_to_string_ex(param);
+ if (!try_convert_to_string(param)) {
+ return;
+ }
+
stmt->stmt->params[i].buffer = Z_STRVAL_P(param);
stmt->stmt->params[i].buffer_length = Z_STRLEN_P(param);
break;
@@ -1781,7 +1784,9 @@ PHP_FUNCTION(mysqli_options)
if (expected_type != Z_TYPE_P(mysql_value)) {
switch (expected_type) {
case IS_STRING:
- convert_to_string_ex(mysql_value);
+ if (!try_convert_to_string(mysql_value)) {
+ return;
+ }
break;
case IS_LONG:
convert_to_long_ex(mysql_value);