Skip to content

Commit 6e201ad

Browse files
committed
Minor existing user check
1 parent c4fd097 commit 6e201ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

classes/patreon_wordpress.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2806,8 +2806,11 @@ public function make_user_select( $selected_user = 1 ) {
28062806
if ( !$existing_author_found ) {
28072807

28082808
$existing_author = get_user_by( 'ID', $selected_user );
2809-
$select .= '<option value="' . $existing_author->data->ID . '" selected>'. $existing_author->data->user_nicename . ' (' . $existing_author->data->display_name .')</option>';
28102809

2810+
if ( $existing_author ) {
2811+
2812+
$select .= '<option value="' . $existing_author->data->ID . '" selected>'. $existing_author->data->user_nicename . ' (' . $existing_author->data->display_name .')</option>';
2813+
}
28112814
}
28122815

28132816

0 commit comments

Comments
 (0)