Ensure no empty strings are fed to TranslatableMarkup

Created on 20 September 2015, almost 9 years ago
Updated 14 December 2023, 7 months ago

Follow-up to #2570285: Make sure TranslatableMarkup accepts string values only β†’

Follow-up to #2557113: Make t() return a TranslationWrapper object to remove reliance on a static, unpredictable safe list β†’

Problem/Motivation

Empty strings are not valid input for the TranslatableMarkup constructor.

Proposed solution

Fail when input doesn't make sense. Test for empty strings before creating new TranslatableMarkup objects, and leave them as plain strings if they are empty.

πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
Language systemΒ  β†’

Last updated about 16 hours ago

  • Maintained by
  • πŸ‡©πŸ‡ͺGermany @sun
Created by

πŸ‡§πŸ‡ͺBelgium mr.baileys πŸ‡§πŸ‡ͺ (Ghent)

Live updates comments and jobs are added and updated live.
  • Runtime assertion

    It deals with the addition of an assert() statement(s) to the code, and/or contains a test patch where one is failing indicating a need to change code or the documentation the statement was based on.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024