Fix potential error when file size is empty in formatter

Created on 10 March 2025, about 2 months ago

Problem/Motivation

After the D11 upgrade in the formatters, we introduced the ByteSizeMarkup class to be used for file size. However, in FileLinkSeparateFormatter formatter we forgot to wrap it with an empty() check because it can be null sometimes and this will trigger a type error.

Steps to reproduce

Create a file entity with a remote file or without an actual file, and use the formatter.

Proposed resolution

Use if empty() check like we do in the FileLinkFormatter.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇧🇪Belgium joevagyok

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