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()
234234 {
235235 $ this ->_tabs = $ this ->reorderTabs ();
236236
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-
245237 if ($ activeTab = $ this ->getRequest ()->getParam ('active_tab ' )) {
246238 $ this ->setActiveTab ($ activeTab );
247239 } elseif ($ activeTabId = $ this ->_authSession ->getActiveTabId ()) {
248240 $ this ->_setActiveTab ($ activeTabId );
249241 }
242+
243+ if ($ this ->_activeTab === null && !empty ($ this ->_tabs )) {
244+ /** @var TabInterface $tab */
245+ $ this ->_activeTab = (reset ($ this ->_tabs ))->getId ();
246+ }
250247
251248 $ this ->assign ('tabs ' , $ this ->_tabs );
252249 return parent ::_beforeToHtml ();
@@ -256,7 +253,7 @@ protected function _beforeToHtml()
256253 /**
257254 * @return array
258255 */
259- protected function reorderTabs ()
256+ private function reorderTabs ()
260257 {
261258 $ orderByIdentity = [];
262259 $ orderByPosition = [];
You can’t perform that action at this time.
0 commit comments