summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_statement.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-05 14:38:01 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-05 14:53:50 +0200
commit7686b0b88906e2522300b9e631ddde2051de839f (patch)
tree31a3cfd1feaf6f7190bad8222a6f9da567acd723 /ext/pdo_sqlite/sqlite_statement.c
parent03a9c2df7baea96a4777346c8799f0a6fdd7c882 (diff)
parenta31f46421d7bf6f55dd9ac5876b8e2eacf7e0708 (diff)
downloadphp-git-7686b0b88906e2522300b9e631ddde2051de839f.tar.gz
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/pdo_sqlite/sqlite_statement.c')
-rw-r--r--ext/pdo_sqlite/sqlite_statement.c8
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),