Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
287 stars 205 forks source link

Check if $term->term_id is set before using it to delete the term #982

Open georgejipa opened 11 months ago

georgejipa commented 11 months ago

Description

Make sure to check if $term->term_id is set before using it to delete the term. This will fix the following PHP notice:

PHP Notice:  Trying to get property 'term_id' of non-object in [redacted]/wp-content/plugins/co-authors-plus/co-authors-plus.php on line 1064

Steps to Test

  1. Go to Users page.
  2. Try to delete a user who is not an author.