Issue Bug Closed

#106652Vimeo video rendering crashes if original file is missing from storage

Benjamin Serfhos 05/06/25, 08:06 updated 12/02/25, 14:21

Description

PHP Warning: Undefined array key 0 in /var/www/html/vendor/typo3/cms-core/Classes/Resource/Rendering/VimeoRenderer.php line 133

If a .vimeo file is deleted from storage the video id parsed returns null.

$videoIdRaw = $this->getVideoIdFromFile($file);
$videoIdRaw = GeneralUtility::trimExplode('/', $videoIdRaw, true);
$videoId = $videoIdRaw[0];

The output of $videoIdRaw is null, so the trimExplode returns an empty array.

A simple null coalesce should solve this issue.

Reviews 2

History 514

  1. Gerrit Code Review pushed patch set 1 for main to change 91271 status Accepted Under Review <span data-processor="relativetime" data-value="2025-10-27T13:23:23+00:00" > 10/27/25, 13:23 </span>

  2. morgane garcia commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-10-30T08:45:09+00:00" > 10/30/25, 08:45 </span>

    Applied in changeset commit:bac865fc1e5f6bbc70b1bd6366cf5b6b6988df07.