com php-src: Fixed bindColumn: ext/pdo/pdo_stmt.c
| From: | Dmitry Stogov | Date: | Fri, 25 Apr 2014 03:36:53 +0000 |
| Subject: | com php-src: Fixed bindColumn: ext/pdo/pdo_stmt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77280@lists.php.net to get a copy of this message | ||
Commit: c5f9b86fd4de8338cb390a92ec40bd1d65618cc4
Author: Xinchen Hui <laruence@gmail.com> Fri, 25 Apr 2014 11:36:53 +0800
Parents: 35f22f609a8300f26b5a3886c92d3eb58052bc86
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c5f9b86fd4de8338cb390a92ec40bd1d65618cc4
Log:
Fixed bindColumn
Changed paths:
M ext/pdo/pdo_stmt.c
Diff:
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index c37df70..e64a8e2 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -318,7 +318,7 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s
parameter = Z_REFVAL(param->parameter);
}
- if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_STR && param->max_value_len <=
0 && !ZVAL_IS_NULL(¶meter)) {
+ if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_STR && param->max_value_len <=
0 && !ZVAL_IS_NULL(parameter)) {
if (Z_TYPE_P(parameter) == IS_DOUBLE) {
char *p;
int len = spprintf(&p, 0, "%.*H", (int) EG(precision), Z_DVAL_P(parameter));
@@ -1590,7 +1590,6 @@ static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t
*stmt,
if (!really_register_bound_param(¶m, stmt, is_param TSRMLS_CC)) {
if (!ZVAL_IS_UNDEF(¶m.parameter)) {
zval_ptr_dtor(&(param.parameter));
- ZVAL_UNDEF(¶m.parameter);
}
return 0;
}