Notice fixes from DD32. see #7509

git-svn-id: https://develop.svn.wordpress.org/trunk@9699 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-11-14 23:01:16 +00:00
parent f6f653c05b
commit 2dc15c5a81
13 changed files with 101 additions and 65 deletions
+2 -2
View File
@@ -459,7 +459,7 @@ function fetch_rss ($url) {
// setup headers
if ( $cache_status == 'STALE' ) {
$rss = $cache->get( $url );
if ( $rss->etag and $rss->last_modified ) {
if ( isset($rss->etag) and $rss->last_modified ) {
$request_headers['If-None-Match'] = $rss->etag;
$request_headers['If-Last-Modified'] = $rss->last_modified;
}
@@ -564,7 +564,7 @@ function _response_to_rss ($resp) {
$rss = new MagpieRSS( $resp->results );
// if RSS parsed successfully
if ( $rss && !$rss->ERROR) {
if ( $rss && (!isset($rss->ERROR) || !$rss->ERROR) ) {
// find Etag, and Last-Modified
foreach( (array) $resp->headers as $h) {