Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#29072 closed defect (bug) (fixed)

$wp_list_table->items[$plugin_file] assignments failing in 4.0Beta2

Reported by: adiant Owned by: wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Plugins Keywords:
Focuses: Cc:


All testing done with WordPress 4.0-beta2-20140729 with default theme (Twenty Fourteen) and only the plugin causing the problem activated.

Assignments to global $wp_list_table->items[$plugin_file] are failing with the following Notice: "Notice: Indirect modification of overloaded property WP_Plugins_List_Table::$items has no effect in...".

This technique works properly, without any messages, in Version 3.9.1.

This code is only executed in Site Admin for a Network Site; I have not tested in Network Admin or on non-Network installs.

This can be replicated reliably on Version 4.0-beta2-20140729 of WordPress with Version 3.1 of jonradio Reveal Network Activated Plugins on the Installed Plugins page of Site Admin for any site in a Network, when the plugin is Network Activated, or on a single site in a Network when the plugin is not Network Activated but only activated on the single site. The Installed Plugins Admin panel displays the errors when WP_DEBUG is TRUE, and the Plugins table is displayed as empty.

Relevant code sequence (i.e. - only the most relevant statements shown):

global $wp_list_table;
$wp_list_table->items = array();
$wp_list_table->items[$plugin_file] = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, false, true );
uasort( $wp_list_table->items, 'jr_rnap_sort_plugins' );

The last two statements produce the Notice.

Change History (5)

#1 @adiant
6 years ago

  • Version set to trunk

#3 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 4.0

Introduced in [28493].

#4 @wonderboymusic
6 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 29423:

WP_List_Table::items should be public, not protected. It is accessed in a subclass directly via wp_ajax_get_comments().

See [28493].
Fixes #29072.

#5 @adiant
6 years ago

Confirmed as working with the aforementioned Plugin. Thanks to everyone!

Note: See TracTickets for help on using tickets.