Skip to content

Commit 5137aad

Browse files
committed
MAGE-1113 Handle missing placeholder setting
1 parent cb042f7 commit 5137aad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Console/Command/SynonymDeduplicateCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ public function dedupeSynonymsForStore(int $storeId): void
115115
$settings = $this->algoliaHelper->getSettings($indexName);
116116
$deduped = $this->dedupeSpecificSettings(['synonyms', 'altCorrections'], $settings);
117117

118-
//bring over as is
119-
$deduped['placeholders'] = $settings['placeholders'];
118+
//bring over as is (no de-dupe necessary)
119+
if (array_key_exists('placeholders', $settings)) {
120+
$deduped['placeholders'] = $settings['placeholders'];
121+
}
120122

121123
// Updating the synonyms requires a separate endpoint which is not currently not exposed in the PHP API client
122124
// See https://www.algolia.com/doc/rest-api/search/#tag/Synonyms/operation/saveSynonyms

0 commit comments

Comments
 (0)