diff --git a/rt-plugin-report.php b/rt-plugin-report.php index 6edaafc..017124d 100644 --- a/rt-plugin-report.php +++ b/rt-plugin-report.php @@ -360,9 +360,11 @@ private function assemble_plugin_report( $slug ) { // Add the repo info to the report. if ( isset( $returned_object ) ) { if ( ! is_wp_error( $returned_object ) ) { - $report['repo_info'] = $returned_object; - // Cache the report. - set_site_transient( $cache_key, $report, self::CACHE_LIFETIME ); + if ( isset( $returned_object->version ) ) { + $report['repo_info'] = $returned_object; + // Cache the report. + set_site_transient( $cache_key, $report, self::CACHE_LIFETIME ); + } } else { // Store the error code and message in the report. $report['repo_error_code'] = $returned_object->get_error_code(); @@ -492,7 +494,7 @@ private function render_table_row( $report ) { $html .= '