Formatter errors because width and height are not always set

Created on 11 March 2025, 29 days ago

Problem/Motivation

When using the svg_image formatter in forms, the width and height are not always available and cause an error.
Warning: Undefined array key "width" in Drupal\svg_image\Plugin\Field\FieldFormatter\SvgImageFormatter->svgSettingsForm() (line 57 of modules/contrib/svg_image/src/Plugin/Field/FieldFormatter/SvgImageFormatterTrait.php).

Proposed resolution

See fix:

Remaining tasks

Review

🐛 Bug report
Status

Active

Version

3.2

Component

Code

Created by

🇳🇱Netherlands johankleene Helmond

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

Comments & Activities

Production build 0.71.5 2024