Ticket #17416: 17416.diff
| File 17416.diff, 1.1 KB (added by , 15 years ago) |
|---|
-
wp-admin/includes/dashboard.php
1208 1208 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 1209 1209 ); 1210 1210 1211 $r aw_response = wp_remote_post( 'http://api.wordpress.org/core/browse-happy/1.0/', $options );1211 $response = wp_remote_post( 'http://api.wordpress.org/core/browse-happy/1.0/', $options ); 1212 1212 1213 if ( is_wp_error( $r aw_response ) || 200 != $raw_response['response']['code'])1214 return ;1213 if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) 1214 return false; 1215 1215 1216 1216 /** 1217 1217 * Response should be an array with: … … 1224 1224 * 'img_src' - string - An image representing the browser 1225 1225 * 'img_src_ssl' - string - An image (over SSL) representing the browser 1226 1226 */ 1227 $response = unserialize( $raw_response['body']);1227 $response = unserialize( wp_remote_retrieve_body( $response ) ); 1228 1228 1229 1229 if ( ! $response ) 1230 1230 return;