[wp-trac] [WordPress Trac] #44983: REST API: Undefined-property notice when setting term parent to 0

WordPress Trac noreply at wordpress.org
Fri Jan 4 14:47:22 UTC 2019


#44983: REST API: Undefined-property notice when setting term parent to 0
--------------------------------------+-----------------------------
 Reporter:  dlh                       |       Owner:  SergeyBiryukov
     Type:  defect (bug)              |      Status:  reviewing
 Priority:  normal                    |   Milestone:  5.0.3
Component:  REST API                  |     Version:  4.7
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------

Comment (by earnjam):

 @dlh One small thing I noticed in the patch.

 This part is redundant, because `$parent_term_id` is already initialized
 as `0` right above this on line 672.
 {{{
 #!php
 if ( 0 === $requested_parent ) {
     $parent_term_id = $requested_parent;
 }
 }}}

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


More information about the wp-trac mailing list