diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2017-09-01 20:14:25 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2017-09-01 20:14:25 -0400 |
commit | 9577a2e9108f48dc19beca28264c0af227567aac (patch) | |
tree | 62c639f4a486320e595f84e8d986cf8b9c1f0174 /plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php | |
parent | Update akismet 3.3.4 (diff) | |
download | blogs-gentoo-9577a2e9108f48dc19beca28264c0af227567aac.tar.gz blogs-gentoo-9577a2e9108f48dc19beca28264c0af227567aac.tar.bz2 blogs-gentoo-9577a2e9108f48dc19beca28264c0af227567aac.zip |
Update jetpack 5.2.1
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php')
-rw-r--r-- | plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php b/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php index 458d2b6c..02a763ac 100644 --- a/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php +++ b/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php @@ -1329,7 +1329,12 @@ class Jetpack_Core_API_Module_Data_Endpoint { } $data = json_decode( base64_decode( $vaultpress->contact_service( 'plugin_data' ) ) ); - if ( is_wp_error( $data ) || ! isset( $data->backups->last_backup ) ) { + if ( false == $data ) { + return rest_ensure_response( array( + 'code' => 'not_registered', + 'message' => esc_html__( 'Could not connect to VaultPress.', 'jetpack' ) + ) ); + } else if ( is_wp_error( $data ) || ! isset( $data->backups->last_backup ) ) { return $data; } else if ( empty( $data->backups->last_backup ) ) { return rest_ensure_response( array( |