Skip to content

Commit

Permalink
Bug #62593 Updated to account for INOUT parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
willfitch committed Sep 26, 2012
1 parent fde2049 commit 1957350
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/pdo_pgsql/pgsql_statement.c
Expand Up @@ -366,7 +366,8 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
#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) {
if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL &&
((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) {
SEPARATE_ZVAL(&param->parameter);
param->param_type = PDO_PARAM_STR;
ZVAL_STRINGL(param->parameter, Z_BVAL_P(param->parameter) ? "t" : "f", 1, 1);
Expand Down

0 comments on commit 1957350

Please sign in to comment.