Skip to content

Commit

Permalink
Fixed #13062
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Apr 8, 2023
1 parent dc92b93 commit a3a185d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Fixed a bug where element editors were showing provisional changes, even if the user didn’t have permission to save them.
- Fixed a bug where the control panel could be inaccessible if a mutex lock couldn’t be acquired for the queue. ([#13052](https://github.com/craftcms/cms/issues/13052))
- Fixed a bug where it wasn’t possible to update a Matrix block on a revision without a new block ID being assigned. ([#13064](https://github.com/craftcms/cms/discussions/13064))
- Fixed a JavaScript error that could occur on field layout designers, if any tabs didn’t have any elements. ([#13062](https://github.com/craftcms/cms/issues/13062))
- Fixed XSS vulnerabilities.
- Updated yii2-debug to 2.1.22. ([#13058](https://github.com/craftcms/cms/issues/13058))

Expand Down
5 changes: 4 additions & 1 deletion src/helpers/Cp.php
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,10 @@ public static function fieldLayoutDesignerHtml(FieldLayout $fieldLayout, array $
'customizableUi' => true,
];

$tabs = array_filter($fieldLayout->getTabs(), fn(FieldLayoutTab $tab) => !empty($tab->getElements()));
$tabs = array_values(array_filter(
$fieldLayout->getTabs(),
fn(FieldLayoutTab $tab) => !empty($tab->getElements())
));

if (!$config['customizableTabs']) {
$tab = array_shift($tabs) ?? new FieldLayoutTab([
Expand Down

0 comments on commit a3a185d

Please sign in to comment.