NullLogger not implements LoggerChannelInterface

Created on 21 August 2024, 5 months ago
Updated 5 September 2024, 5 months ago

Problem/Motivation

After updating to Drupal version 10.3.2, the following error occurs:

TypeError: Drupal\s3fs\Controller\NewS3fsImageStyleDownloadController::__construct(): Argument #5 ($logger) must be of type Drupal\Core\Logger\LoggerChannelInterface, Psr\Log\NullLogger given, called in /var/www/html/web/modules/contrib/s3fs/src/Controller/NewS3fsImageStyleDownloadController.php on line 101 in Drupal\s3fs\Controller\NewS3fsImageStyleDownloadController->__construct() (line 70 of modules/contrib/s3fs/src/Controller/NewS3fsImageStyleDownloadController.php).

Steps to reproduce

Update Drupal to version 10.3.2.
Attempt to use the S3FS module for image styles.
Observe the error related to the Logger type mismatch.

Proposed resolution

replacing

use Drupal\Core\Logger\LoggerChannelInterface;

with

use Psr\Log\LoggerInterface;

in the relevant controller file. This change would align the logger type with the expected interface and prevent the type mismatch error.

🐛 Bug report
Status

Fixed

Version

3.6

Component

Code

Created by

🇮🇹Italy luxx91

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