File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
app/code/Magento/Store/Model/System Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 33 * Copyright © Magento, Inc. All rights reserved.
44 * See COPYING.txt for license details.
55 */
6+
7+ declare (strict_types=1 );
8+
69namespace Magento \Store \Model \System ;
710
811use Magento \Framework \Data \OptionSourceInterface ;
@@ -126,7 +129,7 @@ public function getStoreValuesForForm($empty = false, $all = false)
126129 if ($ website ->getId () != $ group ->getWebsiteId ()) {
127130 continue ;
128131 }
129- $ groupShow = false ;
132+ $ values = [] ;
130133 foreach ($ this ->_storeCollection as $ store ) {
131134 if ($ group ->getId () != $ store ->getGroupId ()) {
132135 continue ;
@@ -135,16 +138,12 @@ public function getStoreValuesForForm($empty = false, $all = false)
135138 $ options [] = ['label ' => $ website ->getName (), 'value ' => []];
136139 $ websiteShow = true ;
137140 }
138- if (!$ groupShow ) {
139- $ groupShow = true ;
140- $ values = [];
141- }
142141 $ values [] = [
143142 'label ' => str_repeat ($ nonEscapableNbspChar , 4 ) . $ store ->getName (),
144143 'value ' => $ store ->getId (),
145144 ];
146145 }
147- if ($ groupShow ) {
146+ if (! empty ( $ values ) ) {
148147 $ options [] = [
149148 'label ' => str_repeat ($ nonEscapableNbspChar , 4 ) . $ group ->getName (),
150149 'value ' => $ values ,
You can’t perform that action at this time.
0 commit comments