Skip to content

Commit 5e84428

Browse files
committed
AC-6386: TypeError: explode(): Argument #2 ($string) must be of type string
1 parent 4bfb545 commit 5e84428

File tree

1 file changed

+14
-11
lines changed
  • app/code/Magento/Config/Controller/Adminhtml/System/Config

1 file changed

+14
-11
lines changed

app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,20 +222,23 @@ public function execute()
222222
];
223223
$configData = $this->filterNodes($configData);
224224

225+
$groups = $this->getRequest()->getParam('groups');
225226
$europeanUnionCountriesSelectedValues = true;
226-
$fields = $configData['groups']['country']['fields'];
227-
if (isset($fields['eu_countries'])) {
228-
if (empty($fields['eu_countries']['value']) &&
229-
!isset($fields['eu_countries']['inherit'])) {
227+
if (isset($groups['country']['fields'])) {
228+
if(isset($groups['country']['fields']['eu_countries'])) {
229+
$countries = $groups['country']['fields']['eu_countries'];
230+
if (empty($countries['value']) &&
231+
!isset($countries['inherit'])) {
232+
$europeanUnionCountriesSelectedValues = false;
233+
}
234+
} else {
230235
$europeanUnionCountriesSelectedValues = false;
231236
}
232-
} else {
233-
$europeanUnionCountriesSelectedValues = false;
234-
}
235-
if (!$europeanUnionCountriesSelectedValues) {
236-
throw new LocalizedException(
237-
__('Something went wrong while saving this configuration.')
238-
);
237+
if (!$europeanUnionCountriesSelectedValues) {
238+
throw new LocalizedException(
239+
__('Something went wrong while saving this configuration.')
240+
);
241+
}
239242
}
240243

241244
/** @var \Magento\Config\Model\Config $configModel */

0 commit comments

Comments
 (0)