flow-development-collection icon indicating copy to clipboard operation
flow-development-collection copied to clipboard

BUG: DatesReader uses non-unique cache key for formatType dateTime which leads to cache collision between different languages

Open daniellienert opened this issue 2 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

The DatesReader (https://github.com/neos/flow/blob/master/Classes/I18n/Cldr/Reader/DatesReader.php) caches the parsed format (which is a multi-dimensional array) by its format string (Like "d.m.Y").

For a dateTime this format just contains a placeholder like "{0} {1}".

With this, it's the same cache key for all languages. Which means, that the first format rendered is cached and used for all languages .

Expected Behavior

DateTime is rendered in the locale as requested.

Steps To Reproduce

No response

Environment

- Flow: Since 2010 ...
- PHP: irrelevant

Anything else?

No response

daniellienert avatar May 28 '22 21:05 daniellienert