StringDatabaseStorage::deleteStrings() does not work

Created on 6 January 2025, 3 months ago

Problem/Motivation

Calling \Drupal::service('locale.storage')->deleteStrings() never seems to work.
It fails with this error:

Drupal\Core\Database\InvalidQueryException Calling Drupal\Core\Database\Query\Condition::condition() without an array compatible operator is not supported. See https://www.drupal.org/node/3350985 β†’ .

$lids is an array but dbDelete() does not use an IN condition.

(This method does not seem to be used by core itself.)

Steps to reproduce

\Drupal::service('locale.storage')->deleteStrings(['lid' => 1]);

Proposed resolution

dbDelete() should probably support multiple values.

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

locale.module

Created by

πŸ‡«πŸ‡·France prudloff Lille

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024