From f0acff420d87743d6c6deab6f0e41af740b90512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sun, 24 Nov 2024 09:51:08 +0100 Subject: [PATCH] Fix: hook for ActivityPub transformer might also return null --- includes/class-setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-setup.php b/includes/class-setup.php index 2912002..7d1ddb5 100644 --- a/includes/class-setup.php +++ b/includes/class-setup.php @@ -252,7 +252,7 @@ class Setup { * * @return \Activitypub\Transformer\Base|null */ - public function register_activitypub_event_transformer( $transformer, $wp_object, $object_class ): \Activitypub\Transformer\Base { + public function register_activitypub_event_transformer( $transformer, $wp_object, $object_class ): ?\Activitypub\Transformer\Base { // If the current WordPress object is not a post (e.g., a WP_Comment), don't change the transformer. if ( 'WP_Post' !== $object_class ) { return $transformer;