TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, array given in htmlspecialchars()

Created on 11 October 2023, about 1 year ago
Updated 12 July 2024, 5 months ago

Problem/Motivation

When uploading video's via the D10 layout builder modal you get the a quit error like 'Oops, something went wrong. Check your browser's developer console for more details.'

Steps to reproduce

  1. Edit a page
  2. Add/edit block with media video
  3. Upload new video
  4. Use a link such as https://player.vimeo.com/progressive_redirect/playback/123456789/renditi...

Proposed resolution

ProviderPluginBase::getVideoId() is expected to return a string - it's being used by ProviderPluginBase::getName()
the implementation in Html5 class returns an array instead

Remaining tasks

Come up with a solution.
Quick fix is to implement Html5::getName() and

  • leave the name empty
  • use the first value of the array
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇷🇴Romania reszli Târgu Mureș

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