mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 18:24:31 +00:00
Error checking for HTTP requests. Props jacobsantos. see #7793
git-svn-id: https://develop.svn.wordpress.org/trunk@9051 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -38,6 +38,9 @@ $options['headers'] = array(
|
||||
|
||||
$response = wp_remote_get('http://api.pingomatic.com/updated-batch/', $options);
|
||||
|
||||
if ( is_wp_error( $response ) )
|
||||
wp_die(__('Request Failed.'));
|
||||
|
||||
if ( $response['response']['code'] != 200 )
|
||||
wp_die(__('Request Failed.'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user