mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
ext/sqlite: Sqlite3Stmt::bindParam/bindValue named parameters change. (#14393)
memmove seems unnecessary on `:` autoprepend.
This commit is contained in:
@@ -1656,7 +1656,7 @@ static int register_bound_parameter_to_sqlite(struct php_sqlite3_bound_param *pa
|
||||
/* pre-increment for character + 1 for null */
|
||||
zend_string *temp = zend_string_alloc(ZSTR_LEN(param->name) + 1, 0);
|
||||
ZSTR_VAL(temp)[0] = ':';
|
||||
memmove(ZSTR_VAL(temp) + 1, ZSTR_VAL(param->name), ZSTR_LEN(param->name) + 1);
|
||||
memcpy(ZSTR_VAL(temp) + 1, ZSTR_VAL(param->name), ZSTR_LEN(param->name) + 1);
|
||||
param->name = temp;
|
||||
} else {
|
||||
param->name = zend_string_copy(param->name);
|
||||
|
||||
Reference in New Issue
Block a user