Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Notice: Trying to access array offset on value of type null in /mnt/www/html/veoliad801dev4/docroot/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php on line 210
Notice: Trying to access array offset on value of type null in /mnt/www/html/veoliad801dev4/docroot/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php on line 167
Steps to reproduce
Go to url /admin/structure/media/manage/image/display
and checkout the two notices
Proposed resolution
Apply the required patch
Comments
Comment #2
dhirendra.mishra CreditAttribution: dhirendra.mishra at Axelerant for Axelerant commentedComment #3
cilefen CreditAttribution: cilefen as a volunteer commentedIs this a duplicate of #3291622: Formatter 'URL to image' from ImageUrlFormatter shows PHP warning due to the newly introduced loading attribute on image field?
We need steps to reproduce on a clean Drupal install if not.
Comment #5
simonbaeseI am getting this error with Drupal 9.4.8 and the following steps:
- create new media type
- add image field to media type
- go to manage display and select "URL to image" as image format
- try to save the form