Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#31995 closed defect (bug) (duplicate)

Errors while "View details" for plugin. Error source: class-wp-plugin-install-list-table.php line 36

Reported by: darkog's profile DarkoG Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1.1
Component: Plugins Keywords:
Focuses: administration Cc:

Description

Hello,

I noticed when i clicked on some plugin's "View details". Please check the screenshot.

File: /wp-admin/includes/class-wp-plugin-install-list-table.php line 36

I just added additional check to sensure the $slug is not empty value

if(isset($plugin->slug) && !empty($plugin->slug)){
	$slugs[] = $plugin->slug;
}

Here is the full function:

protected function get_installed_plugin_slugs() {
	$slugs = array();

	$plugin_info = get_site_transient( 'update_plugins' );
	if ( isset( $plugin_info->no_update ) ) {
		foreach ( $plugin_info->no_update as $plugin ) {
			if(isset($plugin->slug) && !empty($plugin->slug)){
				$slugs[] = $plugin->slug;
			}
		}
	}

	if ( isset( $plugin_info->response ) ) {
		foreach ( $plugin_info->response as $plugin ) {
			$slugs[] = $plugin->slug;
		}
	}

	return $slugs;
}

Here is the image

http://factory.darkog.com/upload/error.jpg

Change History (2)

#1 @SergeyBiryukov
9 years ago

  • Component changed from General to Plugins
  • Focuses administration added

#2 @DrewAPicture
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @DarkoG, welcome to Trac!

Sorry it took so long for somebody to get back to you. I'm actually going to close this ticket as a duplicate of #33330, which has a patch. Thanks for the report!

Note: See TracTickets for help on using tickets.