Skip to content

Commit dec9095

Browse files
committed
ACP2E-4311: Error loading some locale
1 parent d4bf2e4 commit dec9095

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

lib/internal/Magento/Framework/View/Element/Html/Calendar.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Framework\View\Element\Html;
77

@@ -74,7 +74,11 @@ protected function _toHtml()
7474
[
7575
'wide' => $this->encoder->encode(array_values(iterator_to_array($daysData['format']['wide']))),
7676
'abbreviated' => $this->encoder->encode(
77-
array_values(iterator_to_array($daysData['format']['abbreviated']))
77+
array_values(
78+
iterator_to_array(
79+
$daysData['format']['abbreviated'] ?? $daysData['format']['wide']
80+
)
81+
)
7882
),
7983
]
8084
);

lib/internal/Magento/Framework/View/Test/Unit/Element/Html/CalendarTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -51,6 +51,7 @@ public static function localesDataProvider()
5151
['lv_LV'],
5252
['sv_SE'],
5353
['de_AT'],
54+
['ar_SA'],
5455
];
5556
}
5657

0 commit comments

Comments
 (0)