[wp-trac] [WordPress Trac] #34148: PHP notice in class WP_List_Table using register_column_headers (_WP_List_Table_Compat)

WordPress Trac noreply at wordpress.org
Wed Nov 18 21:43:03 UTC 2015


#34148: PHP notice in class WP_List_Table using register_column_headers
(_WP_List_Table_Compat)
----------------------------+-----------------------------
 Reporter:  Hax             |       Owner:
     Type:  defect (bug)    |      Status:  assigned
 Priority:  normal          |   Milestone:  4.4
Component:  Administration  |     Version:  4.3
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  administration
----------------------------+-----------------------------

Comment (by JustinSainton):

 Per @danielbachhuber's request, steps to replicate:

 1) register column headers on a page, via `register_column_headers()`
 2) Attempt to print those column headers, via `print_column_headers()`
 3) Note that it works fine in 4.3.1.  It prints the column headers as
 expected.
 4) In trunk, currently, it prints the column headers, but is preceded by
 this warning: Warning: Invalid argument supplied for foreach() in /srv/www
 /wordpress-default/wp-admin/includes/class-wp-list-table.php on line 907

 Here's a dumb little gist to replicate the issue (on media settings page,
 just for fun.)

 https://gist.github.com/JustinSainton/37326773b4c3ac3c94db

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34148#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list