PHP Error on Embedding YouTube URLs in youtube.com/live Format

Created on 13 November 2024, about 1 month ago

Problem/Motivation

When embedding a YouTube video with a URL starting with `youtube.com/live` as a media item and then placing that media onto a page, visiting that page results in a PHP error:
Deprecated function: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated em Drupal\oembed_lazyload_youtube\Plugin\oembed_lazyload\ProviderEnhancer\YoutubeEnhancer->getEmbedCode() (linha 75 de /var/www/uniube/docroot/modules/contrib/oembed_lazyload/modules/oembed_lazyload_youtube/src/Plugin/oembed_lazyload/ProviderEnhancer/YoutubeEnhancer.php)

Steps to reproduce

  • Add any YouTube video with a `youtube.com/live` URL as a media item
  • Embed that media item onto a node
  • Visit the node
  • Notice the error message in the log messages

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

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