Skip to content

Commit

Permalink
Add additional array index check
Browse files Browse the repository at this point in the history
  • Loading branch information
josdigital committed Oct 23, 2024
1 parent 84bf582 commit b2585f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/AlgoliaSyncService.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function algoliaElementSynced($element): bool
CASE 'craft\elements\Entry':
CASE 'craft\elements\Category':
CASE 'craft\elements\Asset':
if ( isset($algoliaSettings['algoliaElements'][$elementInfo['type']][$elementInfo['sectionId'][0]]['sync'])
if ( isset($elementInfo['sectionId'][0]) && isset($algoliaSettings['algoliaElements'][$elementInfo['type']][$elementInfo['sectionId'][0]]['sync'])
&&
$algoliaSettings['algoliaElements'][$elementInfo['type']][$elementInfo['sectionId'][0]]['sync'] == 1
)
Expand Down

0 comments on commit b2585f0

Please sign in to comment.