From ed0d5e9b2f6f0be5c1ee176aa2180188534e7255 Mon Sep 17 00:00:00 2001 From: Johannes Wachter Date: Mon, 18 Dec 2023 14:24:02 +0100 Subject: [PATCH] fix phpstan --- Routing/ArticleRouteDefaultProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Routing/ArticleRouteDefaultProvider.php b/Routing/ArticleRouteDefaultProvider.php index a4e8af11..71f9bc6b 100644 --- a/Routing/ArticleRouteDefaultProvider.php +++ b/Routing/ArticleRouteDefaultProvider.php @@ -20,6 +20,7 @@ use Sulu\Bundle\RouteBundle\Routing\Defaults\RouteDefaultsProviderInterface; use Sulu\Component\Content\Compat\Structure\StructureBridge; use Sulu\Component\Content\Compat\StructureManagerInterface; +use Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior; use Sulu\Component\Content\Document\WorkflowStage; use Sulu\Component\Content\Metadata\Factory\StructureMetadataFactoryInterface; use Sulu\Component\Content\Metadata\StructureMetadata; @@ -131,7 +132,7 @@ public function isPublished($entityClass, $id, $locale) return false; } - if ($object->isShadowLocaleEnabled()) { + if ($object instanceof ShadowLocaleBehavior && $object->isShadowLocaleEnabled()) { $object = $this->documentManager->find( $id, $object->getShadowLocale(),