Skip to content

Commit

Permalink
failsafe type check
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst committed Sep 23, 2024
1 parent 8ddb8de commit e1cb939
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions EventSubscriber/SharedProjectSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ public function onActions(PageActionsEvent $event): void
return;
}

/** @var SharedProjectTimesheet $sharedProject */
$sharedProject = $payload['sharedProject'];

if ($sharedProject->getId() === null || $sharedProject->getType() === null) {
if (!$sharedProject instanceof SharedProjectTimesheet || $sharedProject->getId() === null) {
return;
}

Expand Down

0 comments on commit e1cb939

Please sign in to comment.