wp-user-frontend
wp-user-frontend copied to clipboard
Warning: Attempt to read property "roles" ........................ wpuf-functions.php on line 4663
Getting this error on few of my post. And some of my page are already indexing with the following error.
Error on post
Warning: Attempt to read property "roles" on bool in /home1/**********/wp-content/plugins/wp-user-frontend/wpuf-functions.php on line 4663
And Code on 4663 Line,
return ( array ) $user->roles;
function wpuf_get_single_user_roles( $user_id ) { if ( ! is_numeric( $user_id ) ) { return false; }
$user = get_user_by( 'id', $user_id ); return ( array ) $user->roles;
}
anyone here !
@kabirbd89 can you provide some screenshots/video recording as reference?