mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
- Add missing part to make colon in parameter binding optional
This commit is contained in:
parent
e4b07b3ebe
commit
d8eece2b43
@ -303,7 +303,14 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s
|
||||
}
|
||||
|
||||
if (param->name) {
|
||||
param->name = estrndup(param->name, param->namelen);
|
||||
if (is_param && param->name[0] != ':') {
|
||||
char *temp = emalloc(++param->namelen + 1);
|
||||
temp[0] = ':';
|
||||
memmove(temp+1, param->name, param->namelen);
|
||||
param->name = temp;
|
||||
} else {
|
||||
param->name = estrndup(param->name, param->namelen);
|
||||
}
|
||||
zend_hash_update(hash, param->name, param->namelen, param, sizeof(*param), (void**)&pparam);
|
||||
} else {
|
||||
zend_hash_index_update(hash, param->paramno, param, sizeof(*param), (void**)&pparam);
|
||||
|
Loading…
Reference in New Issue
Block a user