[wp-trac] [WordPress Trac] #10047: [Code Review] An array should not be directly put into a string

WordPress Trac wp-trac at lists.automattic.com
Sat Jun 6 10:09:27 GMT 2009


#10047: [Code Review] An array should not be directly put into a string
--------------------------+-------------------------------------------------
 Reporter:  kamiyeye      |       Owner:     
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:  2.8
Component:  Template      |     Version:  2.8
 Severity:  major         |    Keywords:     
--------------------------+-------------------------------------------------
 == Description ==
 In latest wordpress 2.8 nightly build, file wp-includes/'''link-
 template.php''', function '''get_boundary_post''', from line 1037 to
 '''1041'''[[BR]]

 {{{
 $categories = array_merge($cat_array, $excluded_categories);

 $order = $start ? 'ASC' : 'DESC';

 return
 get_posts("numberposts=1&order=$order&orderby=ID&category=$categories");
 }}}
 As you see, $categories is an array, it should not be used in this way,
 which will cause a string "Array" in php, am i right?

 == P/S ==
 I noticed these codes are part of 2.8 new feature "display adjacent
 relational links in the head" - Ticket #8703, thus determine Severity to
 be major. If it doesn't meet your bug evaluation principle, feel free to
 point it.

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


More information about the wp-trac mailing list