Commit: 7ea4f73ad4510088936dc3679e603e2e8569398c Author: Will Fitch <[email protected]> Thu, 20 Sep 2012 12:32:53 -0400 Committer: David Soria Parra <[email protected]> Tue, 30 Oct 2012 14:32:09 +0100 Parents: 2f1c4064f8fd971166df3099729e74e0ecb5d6bc Branches: PHP-5.3 PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7ea4f73ad4510088936dc3679e603e2e8569398c Log: Bug #62593 Updated pdo_pgsql driver to convert boolean values to pg native format in emulation mode Bugs: https://bugs.php.net/62593 Changed paths: M ext/pdo_pgsql/pgsql_statement.c Diff: diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index c35ee33..e5c7032 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -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; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
