Make the fix PHP7.x compatible.

This commit is contained in:
Max Roeleveld
2023-10-09 11:02:20 +02:00
parent 66802e6bdb
commit 3a5b6588eb

View File

@@ -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);
}