Fix #17934: Fix regression in Oracle when binding several string parameters

This commit is contained in:
Alexander Makarov
2020-03-26 13:51:10 +03:00
committed by GitHub
parent 65e5640810
commit f843317d97
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ Yii Framework 2 Change Log
------------------------
- Bug #17932: Fix regression in detection of AJAX requests (samdark)
- Bug #17934: Fix regression in Oracle when binding several string parameters (fen1xpv, samdark)
2.0.33 March 24, 2020
---------------------

View File

@ -21,10 +21,11 @@ class Command extends \yii\db\Command
*/
protected function bindPendingParams()
{
$paramsPassedByReference = [];
foreach ($this->pendingParams as $name => $value) {
if (\PDO::PARAM_STR === $value[1]) {
$passedByRef = $value[0];
$this->pdoStatement->bindParam($name, $passedByRef, $value[1], strlen($value[0]));
$paramsPassedByReference[$name] = $value[0];
$this->pdoStatement->bindParam($name, $paramsPassedByReference[$name], $value[1], strlen($value[0]));
} else {
$this->pdoStatement->bindValue($name, $value[0], $value[1]);
}