PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 All 507 releases
← All changes | jetpack_vendor/automattic/jetpack-search/src/class-plan.php +6 -1 16.2 → 16.3-beta View file →
@@ -49,9 +49,14 @@
49 49 /**
50 50 * Refresh plan info stored in options
51 51 */
52 52 public function get_plan_info_from_wpcom() {
53 - $blog_id = Jetpack_Options::get_option( 'id' );
53 + $blog_id = Jetpack_Options::get_option( 'id' );
54 + // An unregistered site (or a stale cache view hiding the registration) has no
55 + // blog ID: bail rather than requesting the malformed `/sites//…` path.
56 + if ( ! $blog_id ) {
57 + return new WP_Error( 'site_not_registered', 'Site not registered.' );
58 + }
54 59 $response = Client::wpcom_json_api_request_as_blog(
55 60 '/sites/' . $blog_id . '/jetpack-search/plan',
56 61 '2',
57 62 array(),