Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes committed Dec 18, 2023
1 parent cacefbf commit ed0d5e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Routing/ArticleRouteDefaultProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit ed0d5e9

Please sign in to comment.