Skip to content

Commit

Permalink
Fix notices
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed Oct 6, 2024
1 parent 9316abc commit ac9a189
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions includes/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ public function process_admin_edit_friend_feeds() {

$show_on_dashboard = filter_input( INPUT_POST, 'show_on_dashboard', FILTER_VALIDATE_BOOLEAN );
$already_on_dashboard = false;
$widgets = get_user_option( 'friends_dashboard_widgets', $user_id );
$widgets = get_user_option( 'friends_dashboard_widgets', get_current_user_id() );
if ( ! $widgets ) {
$widgets = array();
}
Expand Down Expand Up @@ -1488,12 +1488,13 @@ public function render_admin_edit_friend_feeds() {
$friend = $this->check_admin_edit_friend();

$already_on_dashboard = false;
$widgets = get_user_option( 'friends_dashboard_widgets', $user_id );
$widgets = get_user_option( 'friends_dashboard_widgets', get_current_user_id() );

if ( ! $widgets ) {
$widgets = array();
}
foreach ( $widgets as $widget ) {
if ( $widget['friend'] === $friend->user_login ) {
if ( ! empty( $widget['friend'] ) && $widget['friend'] === $friend->user_login ) {
$already_on_dashboard = true;
break;
}
Expand Down

0 comments on commit ac9a189

Please sign in to comment.