diff --git a/src/Extension/FluentExtension.php b/src/Extension/FluentExtension.php index 1a4750bf..6e353b74 100644 --- a/src/Extension/FluentExtension.php +++ b/src/Extension/FluentExtension.php @@ -1068,7 +1068,7 @@ public function getLocaleInstances(): array { $locales = []; foreach ($this->owner->Locales() as $info) { - if ($info->IsDraft()) { + if (method_exists($info, 'IsDraft') && $info->IsDraft()) { $locales[] = $info->getLocaleObject(); } } diff --git a/src/Extension/FluentSiteTreeExtension.php b/src/Extension/FluentSiteTreeExtension.php index 6d1fc5ab..a6117fa6 100644 --- a/src/Extension/FluentSiteTreeExtension.php +++ b/src/Extension/FluentSiteTreeExtension.php @@ -279,7 +279,7 @@ protected function getLocaleStatusMessage(): ?string $info = $owner->LocaleInformation($locale); // Our content hasn't been drafted or published. - if ($info->getSourceLocale()) { + if (method_exists($info, 'getSourceLocale') && $info->getSourceLocale()) { // If this Locale has a Fallback, then content might be getting inherited from that Fallback. return _t( __CLASS__ . '.LOCALESTATUSFLUENTINHERITED', @@ -506,7 +506,7 @@ protected function updateNoSourceFlag(array &$flags): void $owner = $this->owner; $info = $owner->LocaleInformation($locale); - if ($info->getSourceLocale()) { + if (method_exists($info, 'getSourceLocale') && $info->getSourceLocale()) { return; }