[wp-trac] [WordPress Trac] #21572: Unnecessary function argument for display_rows

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 14 05:09:33 UTC 2012


#21572: Unnecessary function argument for display_rows
--------------------------+-----------------------------
 Reporter:  cojennin      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  trivial       |   Keywords:
--------------------------+-----------------------------
 display_rows($posts = array()) in /wp-admin/includes/class-wp-posts-list-
 table.php (line 303) overrides display_rows() in /wp-admin/includes/class-
 wp-list-table.php (line 807).

 display_rows($posts = array()) never uses the $posts argument because
 $posts is assigned $wp_query->posts later on in the function.

 This argument and the if(empty($posts)) check later in the function are
 extraneous.

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


More information about the wp-trac mailing list