[wp-trac] [WordPress Trac] #18127: Bulk actions being reseted to none

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 15 13:31:57 UTC 2011


#18127: Bulk actions being reseted to none
----------------------------+-----------------------------
 Reporter:  luis.ferro      |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  3.2.1
 Severity:  major           |   Keywords:
----------------------------+-----------------------------
 On class-wp-list-table.php there is in line 276 (or very near) a line
 with:

 if ( is_null( $this->_actions ) )

 Then if it is null, a block of code runs, supposedly to setup the bulk
 actions that may exist for the current page.

 This runs:
 $no_new_actions = $this->_actions = $this->get_bulk_actions();

 $this->get_bulk_actions() returns an empty array, meaning that both
 $no_new_actions and $this->_actions will take that value.

 Then, the $this->_actions get updated with the content of
 bulk_actions-$screen_id actions.

 Then, $this->_actions is parsed by array_intersect_assoc, between
 $this->_actions and the $no_new_actions.

 The problem here is that in effect, the $no_new_actions is an empty array,
 and the intersection of an empty array with one array is... an empty
 array!

 This means that no "bulk_actions" are actually setup and the table will
 not show ANY.

 To correct the issue, just comment the array_intersect_assoc line.

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


More information about the wp-trac mailing list