The method Drupal\Core\Database\Driver\mysql\Connection::__construct() cannot be called without the second parameter being set.

Created on 24 November 2021, about 3 years ago
Updated 27 January 2023, almost 2 years ago

Problem/Motivation

The method Drupal\Core\Database\Driver\mysql\Connection::__construct() cannot be called without the second parameter being set. We have in the method the following code:

if (stripos($connection_options['init_commands']['sql_mode'], $mode) !== FALSE) {

Were $connection_options is the second parameter. If it is not set the following error is given: "TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given".

Proposed resolution

The value of $connection_options['init_commands']['sql_mode'] needs to be set.

Remaining tasks

TBD

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

TBD

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
MySQL driverΒ  β†’

Last updated 2 days ago

Created by

πŸ‡³πŸ‡±Netherlands daffie

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024