Skip to content

Commit

Permalink
fix: Fixed an issue that would cause the `SectionShorthandFieldsAutoc…
Browse files Browse the repository at this point in the history
…omplete` to throw an exception if you were running PHP < 8.0 ([#1436](nystudio107/craft-seomatic#1436))
  • Loading branch information
khalwat committed Mar 19, 2024
1 parent 46bcd7a commit c8c04db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/autocompletes/SectionShorthandFieldsAutocomplete.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function generateCompleteItems(): void
protected function addMagicGetterProperties(ElementInterface $element): void
{
foreach (self::MAGIC_GETTER_PROPERTIES as $key => $value) {
if ($key === $element::class) {
if ($key === get_class($element)) {
foreach ($value as $name => $docs) {
CompleteItem::create()
->insertText($name)
Expand Down

0 comments on commit c8c04db

Please sign in to comment.