diff --git a/src/WP_CLI/ExtensionUpgraderSkin.php b/src/WP_CLI/ExtensionUpgraderSkin.php index cef43ad2..4a2cd169 100644 --- a/src/WP_CLI/ExtensionUpgraderSkin.php +++ b/src/WP_CLI/ExtensionUpgraderSkin.php @@ -22,7 +22,11 @@ public function before() { if ( isset( $this->plugin_info ) && is_array( $this->plugin_info ) && isset( $this->plugin_info['Name'] ) ) { WP_CLI::log( sprintf( 'Updating %s...', html_entity_decode( $this->plugin_info['Name'], ENT_QUOTES, get_bloginfo( 'charset' ) ) ) ); } elseif ( isset( $this->theme_info ) && is_object( $this->theme_info ) && method_exists( $this->theme_info, 'get' ) ) { - WP_CLI::log( sprintf( 'Updating %s...', html_entity_decode( $this->theme_info->get( 'Name' ), ENT_QUOTES, get_bloginfo( 'charset' ) ) ) ); + $theme_name = $this->theme_info->get( 'Name' ); + + if ( false !== $theme_name ) { + WP_CLI::log( sprintf( 'Updating %s...', html_entity_decode( $theme_name, ENT_QUOTES, get_bloginfo( 'charset' ) ) ) ); + } } } } diff --git a/src/WP_CLI/ParseThemeNameInput.php b/src/WP_CLI/ParseThemeNameInput.php index b0bc1ae6..df46b9c8 100644 --- a/src/WP_CLI/ParseThemeNameInput.php +++ b/src/WP_CLI/ParseThemeNameInput.php @@ -138,6 +138,8 @@ private function get_all_themes() { $theme_type = 'block'; } + $description = $theme->get( 'Description' ); + $items[ $stylesheet ] = [ 'name' => $key, 'status' => $this->get_status( $theme ), @@ -147,7 +149,7 @@ private function get_all_themes() { 'version' => $theme->get( 'Version' ), 'update_id' => $stylesheet, 'title' => $theme->get( 'Name' ), - 'description' => wordwrap( $theme->get( 'Description' ) ), + 'description' => false !== $description ? wordwrap( $description ) : '', 'author' => $theme->get( 'Author' ), 'auto_update' => in_array( $stylesheet, $auto_updates, true ), 'auto_update_indicated' => $auto_update_indicated,