mirror of
https://github.com/php/php-src.git
synced 2026-04-08 08:33:06 +02:00
Doh, need to canonicalize parameter names (by prefixing with :) before
attempting to remap them to positional args.
This commit is contained in:
@@ -306,10 +306,6 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s
|
||||
}
|
||||
}
|
||||
|
||||
if (is_param && !rewrite_name_to_position(stmt, param TSRMLS_CC)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (param->name) {
|
||||
if (is_param && param->name[0] != ':') {
|
||||
char *temp = emalloc(++param->namelen + 1);
|
||||
@@ -320,6 +316,14 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s
|
||||
param->name = estrndup(param->name, param->namelen);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_param && !rewrite_name_to_position(stmt, param TSRMLS_CC)) {
|
||||
if (param->name) {
|
||||
efree(param->name);
|
||||
param->name = NULL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* tell the driver we just created a parameter */
|
||||
if (stmt->methods->param_hook) {
|
||||
|
||||
Reference in New Issue
Block a user