Skip to content

Commit 6c69b6e

Browse files
committed
Fixed #4233
1 parent d7a1f7d commit 6c69b6e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Fixed an error that could occur when editing inventory locations. ([#4233](https://github.com/craftcms/commerce/issues/4233))
56
- Fixed a SQL error that could occur when querying for unfulfilled orders on PostgreSQL. ([#4228](https://github.com/craftcms/commerce/issues/4228))
67
- Fixed an error that could occur when resaving variants. ([#4226](https://github.com/craftcms/commerce/issues/4226))
78

src/controllers/InventoryLocationsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ public function actionEdit(?int $inventoryLocationId = null, ?InventoryLocation
132132

133133
// Remove the title/label field from the address field layout
134134
foreach ($form->tabs as &$tab) {
135-
$tab->elements = array_filter($tab->elements, function($element) {
135+
$tab->elements = array_values(array_filter($tab->elements, function($element) {
136136
if (is_array($element) && $element[0] instanceof LabelField && $element[0]->attribute === 'title') {
137137
return false;
138138
}
139139

140140
return true;
141-
});
141+
}));
142142
}
143143

144144
ArrayHelper::prependOrAppend($form->tabs[0]->elements, [

0 commit comments

Comments
 (0)