Avoid a PHP notice in list_plugin_updates() if plugins_api() returned a WP_Error object.
fixes #29583. Built from https://develop.svn.wordpress.org/trunk@29825 git-svn-id: http://core.svn.wordpress.org/trunk@29590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6d0f2dcf11
commit
7dde12f0ba
|
@ -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);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-alpha-20141002';
|
||||
$wp_version = '4.1-alpha-20141003';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue