File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
app/code/Magento/Catalog/Model/ResourceModel Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1148,14 +1148,13 @@ public function getCategoryWithChildren(int $categoryId): array
1148
1148
{
1149
1149
$ connection = $ this ->getConnection ();
1150
1150
1151
- $ select = $ connection ->select ()
1151
+ $ selectAttributeCode = $ connection ->select ()
1152
1152
->from (
1153
1153
['eav_attribute ' => $ this ->getTable ('eav_attribute ' )],
1154
1154
['attribute_id ' ]
1155
1155
)->where ('entity_type_id = ? ' , CategorySetup::CATEGORY_ENTITY_TYPE_ID )
1156
1156
->where ('attribute_code = ? ' , 'is_anchor ' )
1157
1157
->limit (1 );
1158
- $ attributeId = $ connection ->fetchRow ($ select );
1159
1158
1160
1159
$ select = $ connection ->select ()
1161
1160
->from (
@@ -1167,7 +1166,7 @@ public function getCategoryWithChildren(int $categoryId): array
1167
1166
['is_anchor ' => 'cce_int.value ' ]
1168
1167
)->where (
1169
1168
'cce_int.attribute_id = ? ' ,
1170
- $ attributeId [ ' attribute_id ' ]
1169
+ $ connection -> fetchOne ( $ selectAttributeCode )
1171
1170
)->where (
1172
1171
"cce.path LIKE '%/ {$ categoryId }' OR cce.path LIKE '%/ {$ categoryId }/%' "
1173
1172
)->order ('path ' );
You can’t perform that action at this time.
0 commit comments