From 3a5b6588eba669c8e1f40e6d044c37db91bca82f Mon Sep 17 00:00:00 2001 From: Max Roeleveld Date: Mon, 9 Oct 2023 11:02:20 +0200 Subject: [PATCH] Make the fix PHP7.x compatible. --- src/Controller/Backend/ContentEditController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); }