[wp-trac] [WordPress Trac] #29614: wp_update_term() shouldn't allow a term to be assigned to a missing parent

WordPress Trac noreply at wordpress.org
Thu Sep 11 19:18:05 UTC 2014


#29614: wp_update_term() shouldn't allow a term to be assigned to a missing parent
------------------------------------------+------------------
 Reporter:  danielbachhuber               |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  4.1
Component:  Taxonomy                      |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+------------------

Comment (by nacin):

 The unit test factory is for initializing objects that may be needed
 during the test. An actual update should use wp_update_term().

 The test should probably also assert first that changing its parent to a
 term that exists also works.

 Also, we should probably assert that the category's parent changed to 0
 after deletion, and that we're then trying to change it back.

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


More information about the wp-trac mailing list