mirror of
https://github.com/php/php-src.git
synced 2026-04-05 15:12:39 +02:00
Fixed pdo_stmt.c: zval* being passed into zend_parse_parameters_ex
This commit is contained in:
@@ -1542,16 +1542,16 @@ static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt,
|
||||
{
|
||||
struct pdo_bound_param_data param = {{{0}}};
|
||||
zend_long param_type = PDO_PARAM_STR;
|
||||
zval *parameter;
|
||||
zval *parameter, *driver_params = NULL;
|
||||
|
||||
param.paramno = -1;
|
||||
|
||||
if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
|
||||
"lz|llz!", ¶m.paramno, ¶meter, ¶m_type, ¶m.max_value_len,
|
||||
¶m.driver_params)) {
|
||||
&driver_params)) {
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|llz!", ¶m.name,
|
||||
¶meter, ¶m_type, ¶m.max_value_len,
|
||||
¶m.driver_params)) {
|
||||
&driver_params)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1565,6 +1565,10 @@ static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (driver_params) {
|
||||
ZVAL_COPY(¶m.driver_params, driver_params);
|
||||
}
|
||||
|
||||
ZVAL_COPY(¶m.parameter, parameter);
|
||||
if (!really_register_bound_param(¶m, stmt, is_param)) {
|
||||
if (!Z_ISUNDEF(param.parameter)) {
|
||||
|
||||
Reference in New Issue
Block a user