From: Wez Furlong Date: Fri, 21 May 2004 14:14:32 +0000 (+0000) Subject: store the name length in the same manner as it is stored in zvals X-Git-Tag: RELEASE_0_1~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f5b212612745113bfaab1a438e6c53819bb6b2e;p=php store the name length in the same manner as it is stored in zvals --- diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 91a41b1ca4..970ec21901 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -242,7 +242,7 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s if (param->name) { param->name = estrndup(param->name, param->namelen); - zend_hash_update(hash, param->name, param->namelen, param, sizeof(*param), (void**)&pparam); + zend_hash_update(hash, param->name, param->namelen+1, param, sizeof(*param), (void**)&pparam); } else { zend_hash_index_update(hash, param->paramno, param, sizeof(*param), (void**)&pparam); } @@ -554,9 +554,6 @@ static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, ¶m.parameter, ¶m.param_type, ¶m.max_value_len, ¶m.driver_params)) { return 0; } - } else { - /* since we're hashing this, we need the null byte too */ - param.namelen = name_strlen + 1; } if (param.paramno > 0) {