From 3a7e85c5ecc689d3fa2cea934c7c9eba5e12e1ce Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 15 Nov 2008 17:56:44 +0000 Subject: [PATCH] Notice fixes. Props DD32. see #7509 git-svn-id: https://develop.svn.wordpress.org/trunk@9714 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit-attachment-rows.php | 3 +-- wp-includes/post.php | 3 ++- wp-includes/query.php | 8 ++++---- wp-includes/rss.php | 5 +++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index e825f22245..510338dda7 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -24,7 +24,6 @@ if ( ! defined('ABSPATH') ) die(); $column_display_name ) { endwhile; } else { ?> - + escape($q['s']); - if (!$q['sentence'] && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] ) + if (empty($q['sentence']) && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] ) $search .= " OR ($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}')"; if ( !empty($search) ) diff --git a/wp-includes/rss.php b/wp-includes/rss.php index 0d70fba2c6..604a59fd94 100644 --- a/wp-includes/rss.php +++ b/wp-includes/rss.php @@ -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'];