diff --git a/src/Controller/Backend/ContentEditController.php b/src/Controller/Backend/ContentEditController.php index 5041d41f..a960dd47 100644 --- a/src/Controller/Backend/ContentEditController.php +++ b/src/Controller/Backend/ContentEditController.php @@ -630,7 +630,11 @@ class ContentEditController extends TwigAwareController implements BackendZoneIn ) { $currentRelation->getFromContent()->removeRelationsFromThisContent($currentRelation); } - $currentRelations = $currentRelations->filter(fn(Relation $r) => $r !== $currentRelation); + $currentRelations = $currentRelations->filter( + static function (Relation $r) use ($currentRelation) { + return $r !== $currentRelation; + } + ); $this->em->remove($currentRelation); }