diff --git a/.check-author.yml b/.check-author.yml index 46428a4e..f067f511 100644 --- a/.check-author.yml +++ b/.check-author.yml @@ -25,3 +25,4 @@ mapping: - "xantippe " - "zonky2 " - "e-spin " + - "e-spin " diff --git a/src/Data/DefaultDataProviderDBalUtils.php b/src/Data/DefaultDataProviderDBalUtils.php index 2a65d3da..7abf47e2 100644 --- a/src/Data/DefaultDataProviderDBalUtils.php +++ b/src/Data/DefaultDataProviderDBalUtils.php @@ -3,7 +3,7 @@ /** * This file is part of contao-community-alliance/dc-general. * - * (c) 2013-2020 Contao Community Alliance. + * (c) 2013-2023 Contao Community Alliance. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Sven Baumann * @author Richard Henkenjohann * @author Ingolf Steinhardt - * @copyright 2013-2020 Contao Community Alliance. + * @copyright 2013-2023 Contao Community Alliance. * @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -355,9 +355,16 @@ private static function filterInOrNotInList($operation, QueryBuilder $queryBuild { $expressionMethod = lcfirst(preg_replace('/\s+/', '', ucwords(strtolower($operation['operation'])))); + $values = []; + foreach ($operation['values'] as $index => $value) { + $parameterName = $operation['property'] . '_in_' . $index; + $values[] = ':' . $parameterName; + $queryBuilder->setParameter($parameterName, $value); + } + return $queryBuilder ->expr() - ->{$expressionMethod}($operation['property'], $operation['values']); + ->{$expressionMethod}($operation['property'], $values); } /**