Error checking for HTTP requests. Props jacobsantos. see #7793

git-svn-id: http://svn.automattic.com/wordpress/trunk@9051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2008-10-02 00:32:21 +00:00
parent a5f7935d8b
commit 33bcf4ec87
3 changed files with 18 additions and 4 deletions

View File

@@ -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.'));