diff --git a/includes/init.php b/includes/init.php index 0b0c18f..1bde597 100644 --- a/includes/init.php +++ b/includes/init.php @@ -1,9 +1,9 @@ get_var( $wpdb->prepare( @@ -48,6 +50,7 @@ function strip_private_fields( $activity ) { function persist_activity( $activity ) { global $wpdb; + $activity = \util\dereference_object( $activity ); if ( !array_key_exists( 'id', $activity ) ) { return new \WP_Error( 'invalid_activity', @@ -74,6 +77,7 @@ function persist_activity( $activity ) { function create_local_activity( $activity ) { global $wpdb; + $activity = \util\dereference_object( $activity ); if ( !array_key_exists( 'type', $activity ) ) { return new \WP_Error( 'invalid_activity', diff --git a/includes/server/activities/accept.php b/includes/server/activities/accept.php index 4cf425e..2f2d6ec 100644 --- a/includes/server/activities/accept.php +++ b/includes/server/activities/accept.php @@ -1,10 +1,10 @@