From eb9cc0b63fbddd95870deb2286de691ab2cfdaa6 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 25 Jan 2022 12:19:14 +0100 Subject: [PATCH] Update minor things. --- src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ); }