[wp-trac] [WordPress Trac] #20903: Exporter gets stuck in a loop a loop/break in the category hierarchy

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 11 11:26:07 UTC 2012


#20903: Exporter gets stuck in a loop a loop/break in the category hierarchy
--------------------------+---------------------------------
 Reporter:  westi         |      Owner:  westi
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Export        |    Version:  3.4
 Severity:  normal        |   Keywords:  has-patch 3.5-early
--------------------------+---------------------------------
 Ideally it should be impossible for a loop/incorrect parentage in a
 category hierarchy to exist.

 But sometimes they do.

 If one does exist then {{{export_wp()}}} gets stuck :(

 It gets stuck in this code:

 {{{
                 // put categories in order with no child going before its
 parent
                 while ( $cat = array_shift( $categories ) ) {
                         if ( $cat->parent == 0 || isset(
 $cats[$cat->parent] ) )
                                 $cats[$cat->term_id] = $cat;
                         else
                                 $categories[] = $cat;
                 }
 }}}

 Similar to #20635 but different.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20903>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list