[wp-trac] Re: [WordPress Trac] #7147: Problems with 700+ categories

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 17 03:16:23 GMT 2008


#7147: Problems with 700+ categories
--------------------------+-------------------------------------------------
 Reporter:  bi0xid        |        Owner:  anonymous
     Type:  defect        |       Status:  reopened 
 Priority:  normal        |    Milestone:  2.6      
Component:  Optimization  |      Version:  2.5.1    
 Severity:  normal        |   Resolution:           
 Keywords:                |  
--------------------------+-------------------------------------------------
Comment (by ryan):

 Applied the sizeof() fix.  We definitely shouldn't be doing that in a
 loop.

 Passing $terms by ref to _get_term_children() looks like it would cause a
 Call-time pass-by-reference warning since the functions declaration wasn't
 changed to accept pass by ref.  Also, an array passed by ref keeps it
 internal array pointer.  Recursive calls to _get_term_children() would be
 advancing the pointer on the same copy of the terms array, thus the
 location of where the calling function left off would be lost.  Using
 for() instead of foreach() can get around this.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7147#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list