Check thumbnail width and height before using it

Created on 19 May 2025, 12 days ago

Problem/Motivation

Currently the oEmbed from Podigee does not provide a valid thumbnail height and width value. Therefor this must be patched currently in the media Drupal core module.

Proposed resolution

In \Drupal\media\OEmbed\Resource::__construct() the variables $thumbnail_width and $thumbnail_height can be passed into the constructor as NULL. But this values are being used. They are not checked before they are used. Solution: check the values via an if-case before using them.

See attached patch.

🐛 Bug report
Status

Active

Version

10.4

Component

media system

Created by

🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf

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