diff --git a/framework/core/src/Api/Controller/ShowDiscussionController.php b/framework/core/src/Api/Controller/ShowDiscussionController.php index 317995e9a6..ec6fda6751 100644 --- a/framework/core/src/Api/Controller/ShowDiscussionController.php +++ b/framework/core/src/Api/Controller/ShowDiscussionController.php @@ -168,9 +168,15 @@ protected function getRelationCallablesToLoad(Collection $models): array $postCallableRelationships = $this->getPostRelationships(array_keys($addedCallableRelations)); - $relationCallables = array_intersect_key($addedCallableRelations, array_flip(array_map(fn ($relation) => "posts.$relation", $postCallableRelationships))); + $relationCallables = array_intersect_key( + $addedCallableRelations, + array_flip(array_map(fn ($relation) => "posts.$relation", $postCallableRelationships)) + ); // remove posts. prefix from keys - return array_combine(array_map(fn ($relation) => substr($relation, 6), array_keys($relationCallables)), array_values($relationCallables)); + return array_combine( + array_map(fn ($relation) => substr($relation, 6), array_keys($relationCallables)), + array_values($relationCallables) + ); } } diff --git a/framework/core/src/Extend/Notification.php b/framework/core/src/Extend/Notification.php index 5dfd473d91..3f14bddbb5 100644 --- a/framework/core/src/Extend/Notification.php +++ b/framework/core/src/Extend/Notification.php @@ -92,9 +92,15 @@ public function extend(Container $container, Extension $extension = null): void return $existingBlueprints; }); - $container->extend('flarum.api.notification_serializers', fn ($existingSerializers) => array_merge($existingSerializers, $this->serializers)); - - $container->extend('flarum.notification.drivers', fn ($existingDrivers) => array_merge($existingDrivers, $this->drivers)); + $container->extend( + 'flarum.api.notification_serializers', + fn ($existingSerializers) => array_merge($existingSerializers, $this->serializers) + ); + + $container->extend( + 'flarum.notification.drivers', + fn ($existingDrivers) => array_merge($existingDrivers, $this->drivers) + ); foreach ($this->beforeSendingCallbacks as $callback) { NotificationSyncer::beforeSending(ContainerUtil::wrapCallback($callback, $container)); diff --git a/framework/core/src/Frontend/Document.php b/framework/core/src/Frontend/Document.php index 4fa315d52e..d8ff08bcb0 100644 --- a/framework/core/src/Frontend/Document.php +++ b/framework/core/src/Frontend/Document.php @@ -227,7 +227,12 @@ protected function makeHead(): string $head = array_merge($head, $this->makePreloads()); - $head = array_merge($head, array_map(fn ($content, $name) => '', $this->meta, array_keys($this->meta))); + $head = array_merge( + $head, + array_map( + fn ($content, $name) => sprintf('', e($name), e($content)), $this->meta, array_keys($this->meta) + ) + ); return implode("\n", array_merge($head, $this->head)); }