Skip to content

Commit 77819af

Browse files
committed
MAGETWO-98825: [Magento Cloud] When creating a new category, the Category Permissions are set to Deny by default
1 parent 6686949 commit 77819af

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

app/code/Magento/Catalog/Model/Category/StoreCategories.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(
4242
* Get all category ids for store.
4343
*
4444
* @param int|null $storeGroupId
45-
* @return array
45+
* @return int[]
4646
* @throws \Magento\Framework\Exception\NoSuchEntityException
4747
*/
4848
public function getCategoryIds(?int $storeGroupId = null): array
@@ -52,8 +52,13 @@ public function getCategoryIds(?int $storeGroupId = null): array
5252
: Category::TREE_ROOT_ID;
5353
/** @var Category $rootCategory */
5454
$rootCategory = $this->categoryRepository->get($rootCategoryId);
55-
$categoriesIds = $rootCategory->getAllChildren(true);
55+
$categoriesIds = array_map(
56+
function ($value) {
57+
return (int) $value;
58+
},
59+
(array) $rootCategory->getAllChildren(true)
60+
);
5661

57-
return (array) $categoriesIds;
62+
return $categoriesIds;
5863
}
5964
}

app/code/Magento/Config/Model/Config.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -681,7 +681,7 @@ protected function _checkSingleStoreMode(
681681
* Get config data value
682682
*
683683
* @param string $path
684-
* @param null|bool &$inherit
684+
* @param null|bool $inherit
685685
* @param null|array $configData
686686
* @return \Magento\Framework\Simplexml\Element
687687
*/

0 commit comments

Comments
 (0)