mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-28 01:04:35 +00:00
Notice fixes. Props DD32. see #7509
git-svn-id: https://develop.svn.wordpress.org/trunk@9714 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -538,12 +538,17 @@ endif;
|
||||
function _fetch_remote_file ($url, $headers = "" ) {
|
||||
$resp = wp_remote_request($url, array('headers' => $headers, 'timeout' => MAGPIE_FETCH_TIME_OUT));
|
||||
if ( is_wp_error($resp) ) {
|
||||
$error = array_shift($resp->errors);
|
||||
|
||||
$resp = new stdClass;
|
||||
$resp->status = 500;
|
||||
$resp->response_code = 500;
|
||||
$resp->error = $error[0] . "\n"; //\n = Snoopy compatibility
|
||||
return $resp;
|
||||
}
|
||||
$response = new stdClass;
|
||||
$response->status = $resp['response']['code'];
|
||||
$response->response_code = $resp['response']['code'];
|
||||
$response->headers = $resp['headers'];
|
||||
$response->results = $resp['body'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user