Avoid a PHP notice in list_plugin_updates() if plugins_api() returned a WP_Error object.
fixes #29583. git-svn-id: https://develop.svn.wordpress.org/trunk@29825 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
569a80e488
commit
990f01f81f
@ -241,6 +241,10 @@ function list_plugin_updates() {
|
||||
<?php
|
||||
foreach ( (array) $plugins as $plugin_file => $plugin_data) {
|
||||
$info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug ));
|
||||
if ( is_wp_error( $info ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get plugin compat for running version of WordPress.
|
||||
if ( isset($info->tested) && version_compare($info->tested, $cur_wp_version, '>=') ) {
|
||||
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: 100%% (according to its author)'), $cur_wp_version);
|
||||
|
Loading…
Reference in New Issue
Block a user