mirror of
https://ghproxy.net/https://github.com/fairpm/fair-plugin.git
synced 2025-09-05 00:45:54 +08:00
add guard for REST endpoint response of no endpoint (#2)
This commit is contained in:
parent
dc95005106
commit
17cf9e0d2d
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ if ( ! class_exists( 'Fragen\\Git_Updater\\Lite' ) ) {
|
||||||
$response = get_site_transient( "git-updater-lite_{$this->file}" );
|
$response = get_site_transient( "git-updater-lite_{$this->file}" );
|
||||||
if ( ! $response ) {
|
if ( ! $response ) {
|
||||||
$response = wp_remote_post( $url );
|
$response = wp_remote_post( $url );
|
||||||
if ( is_wp_error( $response ) ) {
|
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 404 ) {
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue