Patch rein-pdo-bindValue for PDO related Bug #52699
Patch version 2010-08-25 14:53 UTC
Return to Bug #52699 |
Download this patch
Patch Revisions:
Developer: rein@basefarm.no
Index: ext/pdo/pdo_stmt.c
===================================================================
RCS file: php/ext/pdo/pdo_stmt.c,v
retrieving revision 1.1.1.13
retrieving revision 1.2
diff -u -u -r1.1.1.13 -r1.2
--- ext/pdo/pdo_stmt.c 16 Aug 2010 17:56:42 -0000 1.1.1.13
+++ ext/pdo/pdo_stmt.c 25 Aug 2010 14:22:03 -0000 1.2
@@ -1624,18 +1624,20 @@
static PHP_METHOD(PDOStatement, bindValue)
{
struct pdo_bound_param_data param = {0};
+ long param_type = PDO_PARAM_STR;
PHP_STMT_GET_OBJ;
param.paramno = -1;
- param.param_type = PDO_PARAM_STR;
if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
- "lz/|l", ¶m.paramno, ¶m.parameter, ¶m.param_type)) {
+ "lz/|l", ¶m.paramno, ¶m.parameter, ¶m_type)) {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/|l", ¶m.name,
- ¶m.namelen, ¶m.parameter, ¶m.param_type)) {
+ ¶m.namelen, ¶m.parameter, ¶m_type)) {
RETURN_FALSE;
}
}
+
+ param.param_type = param_type;
if (param.paramno > 0) {
--param.paramno; /* make it zero-based internally */
|