com php-src: Fixed register bound parameters in execute: ext/pdo/pdo_stmt.c

From: Date: Fri, 25 Apr 2014 02:44:21 +0000
Subject: com php-src: Fixed register bound parameters in execute: ext/pdo/pdo_stmt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77290@lists.php.net to get a copy of this message
Commit: 67f27bce553fd07f514c41c472b0284518b57584 Author: Xinchen Hui <laruence@gmail.com> Fri, 25 Apr 2014 10:44:21 +0800 Parents: 36e214c88b6bdaeecc883b3a80cf7fb3511ec0ac Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=67f27bce553fd07f514c41c472b0284518b57584 Log: Fixed register bound parameters in execute Changed paths: M ext/pdo/pdo_stmt.c Diff: diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 689de9b..0c027f4 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -311,7 +311,7 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s } } - if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_STR && param->max_value_len <= 0 && ! ZVAL_IS_NULL(&param->parameter)) { + if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_STR && param->max_value_len <= 0 && !ZVAL_IS_NULL(&param->parameter)) { if (Z_TYPE(param->parameter) == IS_DOUBLE) { char *p; int len = spprintf(&p, 0, "%.*H", (int) EG(precision), Z_DVAL(param->parameter)); @@ -469,7 +469,7 @@ static PHP_METHOD(PDOStatement, execute) } param.param_type = PDO_PARAM_STR; - ZVAL_COPY(tmp, &param.parameter); + ZVAL_COPY(&param.parameter, tmp); if (!really_register_bound_param(&param, stmt, 1 TSRMLS_CC)) { if (!ZVAL_IS_UNDEF(&param.parameter)) {

« previous php.cvs (#77290) next »