mirror of
https://github.com/php/php-src.git
synced 2024-12-12 19:33:31 +08:00
Bug #62593 Updated pdo_pgsql driver to convert boolean values to pg native format in emulation mode
This commit is contained in:
parent
2f1c4064f8
commit
7ea4f73ad4
@ -362,8 +362,19 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
if (param->is_param) {
|
||||
/* We need to manually convert to a pg native boolean value */
|
||||
if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL) {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(¶m->parameter);
|
||||
param->param_type = PDO_PARAM_STR;
|
||||
ZVAL_STRINGL(param->parameter, Z_BVAL_P(param->parameter) ? "t" : "f", 1, 1);
|
||||
}
|
||||
}
|
||||
#if HAVE_PQPREPARE
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user