Skip to content

Commit 9eb7157

Browse files
Merge remote-tracking branch '34092/patch-1' into comm_voted
2 parents 5cedc36 + 3bf2129 commit 9eb7157

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/code/Magento/Theme/Model/Config/Processor/DesignTheme.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function __construct(
4242

4343
/**
4444
* Change value from theme_full_path (Ex. "frontend/Magento/blank") to theme_id field for every existed scope.
45+
*
4546
* All other values leave without changes.
4647
*
4748
* @param array $config
@@ -51,10 +52,10 @@ public function process(array $config)
5152
{
5253
foreach ($config as $scope => &$item) {
5354
if ($scope === \Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT) {
54-
$item = $this->changeThemeFullPathToIdentifier($item);
55+
$item = $this->changeThemeFullPathToIdentifier($item ?? []);
5556
} else {
5657
foreach ($item as &$scopeItems) {
57-
$scopeItems = $this->changeThemeFullPathToIdentifier($scopeItems);
58+
$scopeItems = $this->changeThemeFullPathToIdentifier($scopeItems ?? []);
5859
}
5960
}
6061
}
@@ -63,13 +64,12 @@ public function process(array $config)
6364
}
6465

6566
/**
66-
* Check \Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID config path
67-
* and convert theme_full_path (Ex. "frontend/Magento/blank") to theme_id
67+
* Convert theme_full_path from config (Ex. "frontend/Magento/blank") to theme_id.
6868
*
69-
* @param array $configItems
70-
* @return array
69+
* @see \Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID
70+
* @param array $configItems complete store configuration for a single scope as nested array
7171
*/
72-
private function changeThemeFullPathToIdentifier($configItems)
72+
private function changeThemeFullPathToIdentifier(array $configItems): array
7373
{
7474
$theme = null;
7575
$themeIdentifier = $this->arrayManager->get(DesignInterface::XML_PATH_THEME_ID, $configItems);

0 commit comments

Comments
 (0)