"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "framework/db/conditions/LikeConditionBuilder.php" between
yii2-2.0.35.tar.gz and yii2-2.0.36.tar.gz

About: Yii 2 is a high-performance component-based PHP framework for developing large-scale Web applications (source).

LikeConditionBuilder.php  (yii2-2.0.35):LikeConditionBuilder.php  (yii2-2.0.36)
skipping to change at line 68 skipping to change at line 68
list($andor, $not, $operator) = $this->parseOperator($operator); list($andor, $not, $operator) = $this->parseOperator($operator);
if (!is_array($values)) { if (!is_array($values)) {
$values = [$values]; $values = [$values];
} }
if (empty($values)) { if (empty($values)) {
return $not ? '' : '0=1'; return $not ? '' : '0=1';
} }
if (strpos($column, '(') === false) { if ($column instanceof ExpressionInterface) {
$column = $this->queryBuilder->buildExpression($column, $params);
} elseif (is_string($column) && strpos($column, '(') === false) {
$column = $this->queryBuilder->db->quoteColumnName($column); $column = $this->queryBuilder->db->quoteColumnName($column);
} }
$escapeSql = $this->getEscapeSql(); $escapeSql = $this->getEscapeSql();
$parts = []; $parts = [];
foreach ($values as $value) { foreach ($values as $value) {
if ($value instanceof ExpressionInterface) { if ($value instanceof ExpressionInterface) {
$phName = $this->queryBuilder->buildExpression($value, $params); $phName = $this->queryBuilder->buildExpression($value, $params);
} else { } else {
$phName = $this->queryBuilder->bindParam(empty($escape) ? $value : ('%' . strtr($value, $escape) . '%'), $params); $phName = $this->queryBuilder->bindParam(empty($escape) ? $value : ('%' . strtr($value, $escape) . '%'), $params);
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)