diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index 4508d6d2c..728ef7322 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -595,10 +595,12 @@ class AccompanyingPeriod implements */ public function getComments(): Collection { + $pinnedComment = $this->pinnedComment; + return $this ->comments ->filter( - static fn (Comment $c): bool => $c !== $this->pinnedComment + static fn (Comment $c): bool => $c !== $pinnedComment ); }