[wp-trac] [WordPress Trac] #31199: Potential reference to unset variable in get_bulk_actions (WP_Posts_List_Table)

WordPress Trac noreply at wordpress.org
Sun Feb 1 16:44:16 UTC 2015


#31199: Potential reference to unset variable in get_bulk_actions
(WP_Posts_List_Table)
----------------------------+-----------------------------
 Reporter:  sgrant          |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 get_post_type_object can return null in some cases, which causes a notice
 when current_user_can is called later in the function.

 Attached a patch to check if delete_posts is set, and to only add actions
 if it is. Thanks!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31199>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list