Skip to content

Commit 1fdfffe

Browse files
committed
MAGE-792 Ensure that consecutive array key sequence is preserved on de-duplication so that json_encode does not serialize to a keyed object in the Algolia index
1 parent c8c9f33 commit 1fdfffe

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Helper/Entity/ProductHelper.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,11 @@ protected function getValidCategoryName($category, $rootCat, $storeId): ?string
773773
*/
774774
protected function dedupePaths($paths): array
775775
{
776-
return array_intersect_key(
777-
$paths,
778-
array_unique(array_map('serialize', $paths))
776+
return array_values(
777+
array_intersect_key(
778+
$paths,
779+
array_unique(array_map('serialize', $paths))
780+
)
779781
);
780782
}
781783

0 commit comments

Comments
 (0)