@@ -287,8 +287,8 @@ private function getField(string $sectionId, string $groupId, string $fieldId):
287287 *
288288 * @param Field $field
289289 * @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()
292292 * @return string
293293 */
294294 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
337337 * @param string $sectionId
338338 * @param string $groupId
339339 * @param array $groupData
340- * @param array & $oldConfig
341- * @param array & $extraOldGroups
340+ * @param array $oldConfig
341+ * @param array $extraOldGroups
342342 * @return array
343343 */
344344 private function getChangedPaths (
@@ -384,8 +384,8 @@ private function getChangedPaths(
384384 * @param array $groupData
385385 * @param array $groups
386386 * @param string $sectionPath
387- * @param array & $extraOldGroups
388- * @param array & $oldConfig
387+ * @param array $extraOldGroups
388+ * @param array $oldConfig
389389 * @param \Magento\Framework\DB\Transaction $saveTransaction
390390 * @param \Magento\Framework\DB\Transaction $deleteTransaction
391391 * @return void
@@ -546,6 +546,8 @@ public function setDataByPath($path, $value)
546546 }
547547
548548 $ section = array_shift ($ pathParts );
549+ $ this ->setData ('section ' , $ section );
550+
549551 $ data = [
550552 'fields ' => [
551553 array_pop ($ pathParts ) => ['value ' => $ value ],
@@ -558,8 +560,8 @@ public function setDataByPath($path, $value)
558560 ],
559561 ];
560562 }
561- $ data ['section ' ] = $ section ;
562- $ this ->addData ( $ data );
563+ $ groups = array_replace_recursive (( array ) $ this -> getData ( ' groups ' ), $ data ['groups ' ]) ;
564+ $ this ->setData ( ' groups ' , $ groups );
563565 }
564566
565567 /**
@@ -679,7 +681,7 @@ protected function _checkSingleStoreMode(
679681 * Get config data value
680682 *
681683 * @param string $path
682- * @param null|bool & $inherit
684+ * @param null|bool $inherit
683685 * @param null|array $configData
684686 * @return \Magento\Framework\Simplexml\Element
685687 */
0 commit comments