Extend stage_file_proxy integration

Created on 1 October 2024, 3 months ago

Problem/Motivation

The stage_file_proxy integration introduced in 3.1.x carries a bug which can cause a fatal error:
TypeError: base64_encode(): Argument #1 ($string) must be of type string, bool given in base64_encode() (line 133 of modules/contrib/image_sizes/src/ImageSizesService.php).

This can happen when previously called file_get_contents() returns false, and this is provided as base64_encode() arg.

Proposed resolution

Ensure, $valid_file in the 'stage_file_proxy' Part of ImageSizesService.php is really 'valid', eg. with first fetching via stage_file_proxy service and then checking file_exists() and then set $valid_file

📌 Task
Status

Active

Version

4.0

Component

Code

Created by

🇩🇪Germany drupatz

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