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

Deleting a WP user without without a CAP term is throwing a fatal #1096

Open
kariae opened this issue Feb 7, 2025 · 0 comments
Open

Deleting a WP user without without a CAP term is throwing a fatal #1096

kariae opened this issue Feb 7, 2025 · 0 comments

Comments

@kariae
Copy link

kariae commented Feb 7, 2025

When running a wp_delete_user( $user->ID, $reassign_to ) the delete_user_action action is triggered. For WP users without CAP terms this action throws a fatal error:

Warning: Attempt to read property "term_id" on bool in /path/to/wp-content/plugins/co-authors-plus/php/class-coauthors-plus.php on line 1121

When I checked these lines, $this->get_author_term can return false, and in this case we shouldn't delete the term because it doesn't exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants