File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
app/code/Magento/Catalog/Model/ResourceModel/Product
dev/tests/static/testsuite/Magento/Test/Php Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2121,7 +2121,9 @@ private function getChildrenCategories(int $categoryId): array
2121
2121
if (in_array ($ category ['parent_id ' ], $ categoryIds )
2122
2122
&& in_array ($ category ['parent_id ' ], $ anchorCategory )) {
2123
2123
$ categoryIds [] = (int )$ category [$ linkField ];
2124
- if ($ category ['is_anchor ' ] == 1 ) {
2124
+ // Storefront approach is to treat non-anchor children of anchor category as anchors.
2125
+ // Adding their's IDs to $anchorCategory for consistency.
2126
+ if ($ category ['is_anchor ' ] == 1 || in_array ($ category ['parent_id ' ], $ anchorCategory )) {
2125
2127
$ anchorCategory [] = (int )$ category [$ linkField ];
2126
2128
}
2127
2129
}
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ private static function getAddedFilesList($changedFilesBaseDir)
142
142
function () {
143
143
// if no list files, probably, this is the dev environment
144
144
// phpcs:ignore Generic.PHP.NoSilencedErrors,Magento2.Security.InsecureFunction
145
- @exec ('git diff --cached --name-only ' , $ addedFiles );
145
+ @exec ('git diff --cached --name-only --diff-filter=A ' , $ addedFiles );
146
146
return $ addedFiles ;
147
147
}
148
148
);
You can’t perform that action at this time.
0 commit comments