diff --git a/includes/class-comments.php b/includes/class-comments.php index 6cf3d8c..03d8740 100644 --- a/includes/class-comments.php +++ b/includes/class-comments.php @@ -27,6 +27,9 @@ class Comments { */ public static function preprocess_comment( $commentdata ) { // only process replies from authorized local actors, for ap enabled post types + if ( ! isset( $commentdata['user_id'] ) ) { + return $commentdata; + } $user = \get_userdata( $commentdata['user_id'] ); $comment_post_type = \get_post_type( $commentdata['comment_post_ID'] ); $post_types = \get_option( 'activitypub_support_post_types', array( 'post', 'page' ) );