[wp-trac] Re: [WordPress Trac] #9661: cat_row doesn't not list all categories

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 28 03:42:08 GMT 2009


#9661: cat_row  doesn't not list all categories
--------------------------------+-------------------------------------------
 Reporter:  hailin              |        Owner:  anonymous 
     Type:  defect (bug)        |       Status:  closed    
 Priority:  normal              |    Milestone:  Unassigned
Component:  General             |      Version:            
 Severity:  normal              |   Resolution:  invalid   
 Keywords:  developer-feedback  |  
--------------------------------+-------------------------------------------
Changes (by hakre):

  * keywords:  reporter-feedback => developer-feedback


Comment:

 Replying to [comment:11 hailin]:
 > Okay, he root cause is that unset($categories[$i])
 > mistakenly unsets wrong element because it assumes
 > the index always begins with 0, and auto-increments.
 Now that sounds like a Bug! Thanks for pin-pointing it down.

 > So the quick fix is to remember the $key, and unset( $categories[ $key ]
 )
 array_values() might come in handy as well.

 > The second issue the new patch fixes is when the page starts in a
 subtree case.
 could you anaylze why this is running into problems?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9661#comment:13>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list