Exception: Warning: Trying to access array offset in... -> Calendar.php since upgrade to ICU 74.1 (PHP Intl) #38214
Closed
Description
Preconditions and environment
Magento version 2.4.6-P3.
PHP v8.1.25.
ICU 74.1 (required by PHP Intl)
FreeBSD 13.2-RELEASE-p5
Steps to reproduce
Install the above versions and visit either the backend or the frontend.
Expected result
No errors in var/log/exception.log
Actual result
Errors on each store visit in exception.log:
main.CRITICAL: Exception: Warning: Trying to access array offset on value of type null in /vendor/magento/framework/View/Element/Html/Calendar.php on line 114 in /vendor/magento/framework/App/ErrorHandler.php:62
Additional information
Magento is using 'Swedish' as locale, and doesn't use am or pm (24 hrs). Set on Scope -> Default Config
Stores -> Configurations -> General -> Locale Options -> Locale
Magento is set up with 8 web sites, stores and views.
Line 114 in Calendar.php:
$this->assign('am', $this->encoder->encode($localeData['calendar']['gregorian']['AmPmMarkers']['0']));
Triage and priority
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
Metadata
Assignees
Labels
Type
Projects
Status
Done