Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Attempt to read property "roles" ........................ wpuf-functions.php on line 4663 #1452

Open
kabirbd89 opened this issue Mar 31, 2024 · 2 comments
Assignees

Comments

@kabirbd89
Copy link

kabirbd89 commented Mar 31, 2024

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;

}

@kabirbd89
Copy link
Author

anyone here !

@anik-fahmid
Copy link

@kabirbd89 can you provide some screenshots/video recording as reference?

@anik-fahmid anik-fahmid self-assigned this Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants