Skip to content

Commit

Permalink
Merge pull request #45 from brilliancenw/fix/additional-array-index-c…
Browse files Browse the repository at this point in the history
…heck

Add additional array index check
  • Loading branch information
markmiddleton authored Oct 28, 2024
2 parents 84bf582 + b2585f0 commit 7269e61
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 7269e61

Please sign in to comment.