@@ -287,8 +287,8 @@ private function getField(string $sectionId, string $groupId, string $fieldId):
287
287
*
288
288
* @param Field $field
289
289
* @param string $fieldId Need for support of clone_field feature
290
- * @param array & $oldConfig Need for compatibility with _processGroup()
291
- * @param array & $extraOldGroups Need for compatibility with _processGroup()
290
+ * @param array $oldConfig Need for compatibility with _processGroup()
291
+ * @param array $extraOldGroups Need for compatibility with _processGroup()
292
292
* @return string
293
293
*/
294
294
private function getFieldPath (Field $ field , string $ fieldId , array &$ oldConfig , array &$ extraOldGroups ): string
@@ -337,8 +337,8 @@ private function isValueChanged(array $oldConfig, string $path, array $fieldData
337
337
* @param string $sectionId
338
338
* @param string $groupId
339
339
* @param array $groupData
340
- * @param array & $oldConfig
341
- * @param array & $extraOldGroups
340
+ * @param array $oldConfig
341
+ * @param array $extraOldGroups
342
342
* @return array
343
343
*/
344
344
private function getChangedPaths (
@@ -384,8 +384,8 @@ private function getChangedPaths(
384
384
* @param array $groupData
385
385
* @param array $groups
386
386
* @param string $sectionPath
387
- * @param array & $extraOldGroups
388
- * @param array & $oldConfig
387
+ * @param array $extraOldGroups
388
+ * @param array $oldConfig
389
389
* @param \Magento\Framework\DB\Transaction $saveTransaction
390
390
* @param \Magento\Framework\DB\Transaction $deleteTransaction
391
391
* @return void
@@ -546,6 +546,8 @@ public function setDataByPath($path, $value)
546
546
}
547
547
548
548
$ section = array_shift ($ pathParts );
549
+ $ this ->setData ('section ' , $ section );
550
+
549
551
$ data = [
550
552
'fields ' => [
551
553
array_pop ($ pathParts ) => ['value ' => $ value ],
@@ -558,8 +560,8 @@ public function setDataByPath($path, $value)
558
560
],
559
561
];
560
562
}
561
- $ data ['section ' ] = $ section ;
562
- $ this ->addData ( $ data );
563
+ $ groups = array_replace_recursive (( array ) $ this -> getData ( ' groups ' ), $ data ['groups ' ]) ;
564
+ $ this ->setData ( ' groups ' , $ groups );
563
565
}
564
566
565
567
/**
@@ -679,7 +681,7 @@ protected function _checkSingleStoreMode(
679
681
* Get config data value
680
682
*
681
683
* @param string $path
682
- * @param null|bool & $inherit
684
+ * @param null|bool $inherit
683
685
* @param null|array $configData
684
686
* @return \Magento\Framework\Simplexml\Element
685
687
*/
0 commit comments