Skip to content

Commit

Permalink
Регистронезависимое раскоментирование переменных fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kikimor committed Jul 3, 2018
1 parent 8bd5019 commit b8449a8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions DbCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ protected function prepareSql($query, &$params = null)
protected function replaceComment($query, $comment, $queryInComment, $paramName, &$params)
{
$paramNameLower = mb_strtolower($paramName);

// Формируем имя параметра точно такое же, какое и забиндено в парметры.
foreach ($params as $key => $value) {
if (mb_strtolower($key) == $paramNameLower) {
$paramName = $key;
break;
}
}

$params = array_change_key_case($params, CASE_LOWER);

if (strpos($paramNameLower, '|')) {
Expand Down

0 comments on commit b8449a8

Please sign in to comment.