Skip to content

Exception: Warning: Trying to access array offset in... -> Calendar.php since upgrade to ICU 74.1 (PHP Intl) #38214

Closed
@Munktells

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:

2023-11-22 171407
$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

Area: FrameworkIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.6-p3Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions