Skip to content

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

Open
@kariae

Description

@kariae

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions