summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/pgsql_statement.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-02-20 22:25:42 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-02-20 22:25:42 +0300
commit71d41ca6bb3a9d888b39f34a30f994ac1cf88873 (patch)
tree3a11365b77b332c078440204fb82549d34237a35 /ext/pdo_pgsql/pgsql_statement.c
parent2d50280dd013556e51b6f275ca965fe7b530029b (diff)
parent1ceec3a053647865493ab417d3ce401b9bc42450 (diff)
downloadphp-71d41ca6bb3a9d888b39f34a30f994ac1cf88873.tar.gz
Merge branch 'master-5.6' of git://anonscm.debian.org/pkg-php/php
Conflicts: debian/changelog debian/patches/series
Diffstat (limited to 'ext/pdo_pgsql/pgsql_statement.c')
-rw-r--r--ext/pdo_pgsql/pgsql_statement.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c
index 35e69a3c0..d9b1790b8 100644
--- a/ext/pdo_pgsql/pgsql_statement.c
+++ b/ext/pdo_pgsql/pgsql_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -297,7 +297,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
sizeof(Oid));
}
if (param->paramno >= 0) {
- if (param->paramno > zend_hash_num_elements(stmt->bound_param_map)) {
+ if (param->paramno >= zend_hash_num_elements(stmt->bound_param_map)) {
pdo_pgsql_error_stmt(stmt, PGRES_FATAL_ERROR, "HY105");
return 0;
}
@@ -371,6 +371,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) {
SEPARATE_ZVAL(&param->parameter);
param->param_type = PDO_PARAM_STR;
+ convert_to_boolean(param->parameter);
ZVAL_STRINGL(param->parameter, Z_BVAL_P(param->parameter) ? "t" : "f", 1, 1);
}
}