mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +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:
|
case PDO_PARAM_STR:
|
||||||
default:
|
default:
|
||||||
i = sqlite3_bind_text(S->stmt, param->paramno + 1,
|
if (Z_TYPE_P(param->parameter) == IS_NULL) {
|
||||||
Z_STRVAL_P(param->parameter),
|
i = sqlite3_bind_null(S->stmt, param->paramno + 1);
|
||||||
Z_STRLEN_P(param->parameter),
|
} else {
|
||||||
SQLITE_STATIC);
|
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)
|
if (i == SQLITE_OK)
|
||||||
return 1;
|
return 1;
|
||||||
pdo_sqlite_error_stmt(stmt);
|
pdo_sqlite_error_stmt(stmt);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue