diff --git a/src/bp-core/classes/class-bb-topics-manager.php b/src/bp-core/classes/class-bb-topics-manager.php index d1f2a7b3db7..cf5be66f16c 100644 --- a/src/bp-core/classes/class-bb-topics-manager.php +++ b/src/bp-core/classes/class-bb-topics-manager.php @@ -1726,6 +1726,7 @@ public function bb_migrate_topic_ajax() { $item_type = isset( $_POST['item_type'] ) ? sanitize_text_field( wp_unslash( $_POST['item_type'] ) ) : ''; $new_topic_id = 'migrate' === $migrate_type ? absint( sanitize_text_field( wp_unslash( $_POST['new_topic_id'] ) ) ) : 0; + $result = array(); if ( 'migrate' === $migrate_type && $new_topic_id ) { $result = $this->bb_migrate_topic( array( diff --git a/src/bp-groups/bp-groups-activity.php b/src/bp-groups/bp-groups-activity.php index f4ae97d1452..eeeaa7db19d 100644 --- a/src/bp-groups/bp-groups-activity.php +++ b/src/bp-groups/bp-groups-activity.php @@ -486,7 +486,7 @@ function groups_record_activity( $args = '' ) { 'id' => $activity->id, 'action' => ! empty( $args['action'] ) ? $args['action'] : $activity->action, 'post_title' => ! empty( $args['post_title'] ) ? $args['post_title'] : $activity->post_title, - 'title_required' => ! empty( $args['title_required'] ) ? $args['title_required'] : $activity->title_required, + 'title_required' => ! empty( $args['title_required'] ) ? $args['title_required'] : ( $activity->title_required ?? false ), 'content' => ! empty( $args['content'] ) ? $args['content'] : '', 'component' => $activity->component, 'type' => $activity->type, diff --git a/src/bp-notifications/bp-notifications-functions.php b/src/bp-notifications/bp-notifications-functions.php index 7602106cf65..9a2e0d03f2d 100644 --- a/src/bp-notifications/bp-notifications-functions.php +++ b/src/bp-notifications/bp-notifications-functions.php @@ -1104,7 +1104,7 @@ function bb_notification_avatar() { if ( 'notification' === $object ) { bb_get_default_notification_avatar( 'thumb', $notification ); // Get the small icon for the notification which will print beside the avatar. - echo wp_kses_post( bb_notification_small_icon( $component_action, true, $notification ) ); + echo wp_kses_post( bb_notification_small_icon( $component_action, true, $notification ) ?? '' ); } else { if ( 'group' === $object ) { $group = new BP_Groups_Group( $item_id ); diff --git a/src/bp-xprofile/classes/class-bp-xprofile-profile-completion-widget.php b/src/bp-xprofile/classes/class-bp-xprofile-profile-completion-widget.php index 23492cd6429..f7cc87cfdc1 100644 --- a/src/bp-xprofile/classes/class-bp-xprofile-profile-completion-widget.php +++ b/src/bp-xprofile/classes/class-bp-xprofile-profile-completion-widget.php @@ -63,6 +63,11 @@ function widget( $args, $instance ) { return; } + // If no progress data available (e.g. no applicable fields), bail to avoid undefined key warnings. + if ( empty( $user_progress ) || ! isset( $user_progress['completion_percentage'] ) ) { + return; + } + // Hide the widget if "Hide widget once progress hits 100%" selected and progress is 100% if ( 100 === (int) $user_progress['completion_percentage'] && ! empty( $instance['profile_hide_widget'] ) ) { return;