Plugins: Avoid a PHP notice if the `update-supported` key in plugin data is not set.

Props sanzeeb3.
Merges [48820] to the 5.5 branch.
Fixes #51052.

git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48821 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-08-18 20:38:21 +00:00
parent ba58ceefa4
commit 5b338a892f
1 changed files with 2 additions and 2 deletions

View File

@ -1094,14 +1094,14 @@ class WP_Plugins_List_Table extends WP_List_Table {
if ( isset( $plugin_data['auto-update-forced'] ) ) {
if ( $plugin_data['auto-update-forced'] ) {
// Forced on
// Forced on.
$text = __( 'Auto-updates enabled' );
} else {
$text = __( 'Auto-updates disabled' );
}
$action = 'unavailable';
$time_class = ' hidden';
} elseif ( ! $plugin_data['update-supported'] ) {
} elseif ( empty( $plugin_data['update-supported'] ) ) {
$text = '';
$action = 'unavailable';
$time_class = ' hidden';