Project

General

Profile

Bug #65941 ยป t3-PreparedStatement-execute-zero-parameters.patch

added check for zero arguments to avoid unnecessary call - Daniel Neugebauer, 2015-03-23 16:13

View differences:

typo3_src-6.2.11-mod/typo3/sysext/core/Classes/Database/PreparedStatement.php 2015-03-23 15:36:12.424528200 +0100
$bindParamArguments = array();
$bindParamArguments[] = $combinedTypes;
$numberOfExtraParamArguments = count($values);
for ($i = 0; $i < $numberOfExtraParamArguments; $i++) {
$bindParamArguments[] = &$values[$i];
}
call_user_func_array(array($this->statement, 'bind_param'), $bindParamArguments);
if ($numberOfExtraParamArguments > 0) {
for ($i = 0; $i < $numberOfExtraParamArguments; $i++) {
$bindParamArguments[] = &$values[$i];
}
call_user_func_array(array($this->statement, 'bind_param'), $bindParamArguments);
}
$success = $this->statement->execute();
// Store result
    (1-1/1)