Skip to content

Commit

Permalink
Merge pull request neos#1899 from cron-eu/4.3-issue-564-datesreader-c…
Browse files Browse the repository at this point in the history
…ache

BUGFIX: Make sure to use only a consistent DatesReaderCache
  • Loading branch information
kitsunet committed Jan 24, 2020
2 parents bc4b81d + 220bbe3 commit bf069e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
Expand Up @@ -261,8 +261,9 @@ public function parseFormatFromCldr(Locale $locale, $formatType, $formatLength)
self::validateFormatType($formatType);
self::validateFormatLength($formatLength);

if (isset($this->parsedFormatsIndices[(string)$locale][$formatType][$formatLength])) {
return $this->parsedFormats[$this->parsedFormatsIndices[(string)$locale][$formatType][$formatLength]];
$parsedFormatIndex = $this->parsedFormatsIndices[(string)$locale][$formatType][$formatLength] ?? '';
if (isset($this->parsedFormats[$parsedFormatIndex])) {
return $this->parsedFormats[$parsedFormatIndex];
}

$model = $this->cldrRepository->getModelForLocale($locale);
Expand Down

0 comments on commit bf069e8

Please sign in to comment.