PluginProbe
ActivityPub / 5.7.0
ActivityPub v5.7.0
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
← All changes | includes/transformer/class-user.php +7 -1 9.2.05.7.0 View file →
@@ -20,9 +20,15 @@
20 20 *
21 21 * @return \Activitypub\Activity\Base_Object|\WP_Error The Actor or WP_Error on failure.
22 22 */
23 23 public function to_object() {
24 - return $this->transform_object_properties( Actors::get_by_id( $this->item->ID ) );
24 + $activity_object = $this->transform_object_properties( Actors::get_by_id( $this->item->ID ) );
25 +
26 + if ( \is_wp_error( $activity_object ) ) {
27 + return $activity_object;
28 + }
29 +
30 + return $activity_object;
25 31 }
26 32
27 33 /**
28 34 * Get the Actor ID.