File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
app/code/Magento/Backend/Block/Widget Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -234,19 +234,16 @@ protected function _beforeToHtml()
234
234
{
235
235
$ this ->_tabs = $ this ->reorderTabs ();
236
236
237
- if ($ this ->_activeTab === null ) {
238
- /** @var TabInterface $tab */
239
- foreach ($ this ->_tabs as $ tab ) {
240
- $ this ->_activeTab = $ tab ->getId ();
241
- break ;
242
- }
243
- }
244
-
245
237
if ($ activeTab = $ this ->getRequest ()->getParam ('active_tab ' )) {
246
238
$ this ->setActiveTab ($ activeTab );
247
239
} elseif ($ activeTabId = $ this ->_authSession ->getActiveTabId ()) {
248
240
$ this ->_setActiveTab ($ activeTabId );
249
241
}
242
+
243
+ if ($ this ->_activeTab === null && !empty ($ this ->_tabs )) {
244
+ /** @var TabInterface $tab */
245
+ $ this ->_activeTab = (reset ($ this ->_tabs ))->getId ();
246
+ }
250
247
251
248
$ this ->assign ('tabs ' , $ this ->_tabs );
252
249
return parent ::_beforeToHtml ();
@@ -256,7 +253,7 @@ protected function _beforeToHtml()
256
253
/**
257
254
* @return array
258
255
*/
259
- protected function reorderTabs ()
256
+ private function reorderTabs ()
260
257
{
261
258
$ orderByIdentity = [];
262
259
$ orderByPosition = [];
You can’t perform that action at this time.
0 commit comments