Suppress PHP warnings when it's unable to connect to the database

Created on 15 September 2025, about 1 month ago

Problem/Motivation

The module should suppress certain PHP warnings as they unintentionally clog up the logs.

We already have a dedicated exception being thrown when that happens, so there's no need to log it twice.

It also shows the PHP warning in the UI which shouldn't be necessary.

Steps to reproduce

Provide an invalid database configuration and check the Drupal logs .

Proposed resolution

Suppress the PHP warnings if they're already handled as exceptions.

Remaining tasks

Provide issue fork.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

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

Merge Requests

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