Incompatibility with db merge in Drupal 11

Created on 2 December 2024, 16 days ago

Problem/Motivation

When attempting to ban a new IP address using the IP List form, the following error message occurs:
AssertionError: assert(is_string($field)) in assert()

The issue originates in the AdvbanIpManager controller when executing the following code snippet:

$this->connection->merge('advban_ip')
      ->key(['ip' => $ip])
      ->fields($fields)
      ->execute();

This error is due to the Drupal\Core\Database\Merge::key() method being deprecated and renamed to Merge::keys() in Drupal 11. Further details in the API change documentation β†’ .

πŸ› Bug report
Status

Active

Version

1.6

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024