diff options
Diffstat (limited to 'ext/mysqli')
-rw-r--r-- | ext/mysqli/mysqli.c | 6 | ||||
-rw-r--r-- | ext/mysqli/mysqli_api.c | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 394a838512..9964ea0be4 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -309,6 +309,9 @@ zval *mysqli_read_property(zval *object, zval *member, int type, void **cache_sl if (Z_TYPE_P(member) != IS_STRING) { ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; + if (EG(exception)) { + return &EG(uninitialized_zval); + } } if (obj->prop_handler != NULL) { @@ -342,6 +345,9 @@ zval *mysqli_write_property(zval *object, zval *member, zval *value, void **cach if (Z_TYPE_P(member) != IS_STRING) { ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; + if (EG(exception)) { + return value; + } } obj = Z_MYSQLI_P(object); 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); |