mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
proper fix for PECL Bug #3412
This commit is contained in:
parent
08592b38da
commit
ad60999858
1 changed files with 9 additions and 4 deletions
|
@ -113,10 +113,15 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
|
|||
|
||||
case PDO_PARAM_STR:
|
||||
default:
|
||||
i = sqlite3_bind_text(S->stmt, param->paramno + 1,
|
||||
Z_STRVAL_P(param->parameter),
|
||||
Z_STRLEN_P(param->parameter),
|
||||
SQLITE_STATIC);
|
||||
if (Z_TYPE_P(param->parameter) == IS_NULL) {
|
||||
i = sqlite3_bind_null(S->stmt, param->paramno + 1);
|
||||
} else {
|
||||
convert_to_string(param->parameter);
|
||||
i = sqlite3_bind_text(S->stmt, param->paramno + 1,
|
||||
Z_STRVAL_P(param->parameter),
|
||||
Z_STRLEN_P(param->parameter),
|
||||
SQLITE_STATIC);
|
||||
}
|
||||
if (i == SQLITE_OK)
|
||||
return 1;
|
||||
pdo_sqlite_error_stmt(stmt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue