[wp-trac] [WordPress Trac] #39317: Trying to get property of non-object wp_terms_checklist

WordPress Trac noreply at wordpress.org
Thu Dec 22 11:42:22 UTC 2016


#39317: Trying to get property of non-object wp_terms_checklist
-------------------------------+------------------------------
 Reporter:  jevuska            |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Taxonomy           |     Version:  4.7
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  administration
-------------------------------+------------------------------

Comment (by jevuska):

 Replying to [comment:1 boonebgorges]:
 > Hi @jevuska - Can you share some additional details? What is the code
 you're using to filter `wp_terms_checklist_args`? Are you modifying a
 default WP taxonomy, or a custom one? What is the full text of the "Trying
 to get property..." error (including line number and backtrace, if
 possible)?

 Here my code, just for testing,


 {{{
 add_filter( 'wp_terms_checklist_args', function( $args, $post_id )
 {
  if ( is_admin() )
    $args['descendants_and_self'] = true;

  return $args;
 }, 1, 2 );
 }}}

 With notice:

 {{{
 Notice: Trying to get property of non-object in ...\wp-
 admin\includes\template.php on line 156
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39317#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list