diff --git a/php/WP_CLI/CommandWithTranslation.php b/php/WP_CLI/CommandWithTranslation.php index dbd2ffb4a2..cba6ec7571 100644 --- a/php/WP_CLI/CommandWithTranslation.php +++ b/php/WP_CLI/CommandWithTranslation.php @@ -192,7 +192,8 @@ public function update( $args, $assoc_args ) { // Formats the updates list. foreach ( $updates as $update ) { if ( 'plugin' == $update->type ) { - $plugin_data = array_shift( get_plugins( '/' . $update->slug ) ); + $plugins = get_plugins( '/' . $update->slug ); + $plugin_data = array_shift( $plugins ); $name = $plugin_data['Name']; } elseif ( 'theme' == $update->type ) { $theme_data = wp_get_theme( $update->slug );