From c8c04db13fcabbe31e3f5d04b828b04c37afe577 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Tue, 19 Mar 2024 15:51:03 -0400 Subject: [PATCH] fix: Fixed an issue that would cause the `SectionShorthandFieldsAutocomplete` to throw an exception if you were running PHP < 8.0 ([#1436](https://github.com/nystudio107/craft-seomatic/issues/1436)) --- src/autocompletes/SectionShorthandFieldsAutocomplete.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/autocompletes/SectionShorthandFieldsAutocomplete.php b/src/autocompletes/SectionShorthandFieldsAutocomplete.php index 5393391..4ab6a33 100644 --- a/src/autocompletes/SectionShorthandFieldsAutocomplete.php +++ b/src/autocompletes/SectionShorthandFieldsAutocomplete.php @@ -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)