Skip to content

Commit d864063

Browse files
willfitchdsp
authored andcommitted
Bug #62593 Updated to account for INOUT parameters
1 parent d922e80 commit d864063

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/pdo_pgsql/pgsql_statement.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
366366
#endif
367367
if (param->is_param) {
368368
/* We need to manually convert to a pg native boolean value */
369-
if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL) {
369+
if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL &&
370+
((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) {
370371
SEPARATE_ZVAL(&param->parameter);
371372
param->param_type = PDO_PARAM_STR;
372373
ZVAL_STRINGL(param->parameter, Z_BVAL_P(param->parameter) ? "t" : "f", 1, 1);

0 commit comments

Comments
 (0)