diff options
Diffstat (limited to 'ext/pdo_sqlite/sqlite_statement.c')
-rw-r--r-- | ext/pdo_sqlite/sqlite_statement.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c index 186bf182b1..d8a68efb05 100644 --- a/ext/pdo_sqlite/sqlite_statement.c +++ b/ext/pdo_sqlite/sqlite_statement.c @@ -153,7 +153,9 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d pdo_sqlite_error_stmt(stmt); return 0; } else { - convert_to_string(parameter); + if (!try_convert_to_string(parameter)) { + return 0; + } } if (SQLITE_OK == sqlite3_bind_blob(S->stmt, param->paramno + 1, @@ -176,7 +178,9 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d return 1; } } else { - convert_to_string(parameter); + if (!try_convert_to_string(parameter)) { + return 0; + } if (SQLITE_OK == sqlite3_bind_text(S->stmt, param->paramno + 1, Z_STRVAL_P(parameter), Z_STRLEN_P(parameter), |