diff --git a/src/MetaModel.php b/src/MetaModel.php index 3f0857eff..70cbb995a 100644 --- a/src/MetaModel.php +++ b/src/MetaModel.php @@ -1174,17 +1174,20 @@ public function getAttributeOptions($strAttribute, $objFilter = null) * * @return void */ + /** @psalm-suppress DeprecatedMethod - Connection::quoteIdentifier() is marked internal/deprecated in DBAL 4 + * with no replacement that also works on DBAL 3. */ protected function saveSimpleColumn($strColumn, $arrIds, $varData) { if (\is_array($varData)) { $varData = \serialize($varData); } - $builder = $this->getConnection()->createQueryBuilder(); + $connection = $this->getConnection(); + $builder = $connection->createQueryBuilder(); $builder ->update($this->getTableName()) - ->set($strColumn, \is_array($varData) ? \serialize($varData) : $varData) + ->set($connection->quoteIdentifier($strColumn), \is_array($varData) ? \serialize($varData) : $varData) ->where($builder->expr()->in('id', ':ids')) ->setParameter('ids', $arrIds, ArrayParameterType::STRING) ->executeQuery();