Make WordPress Core

Ticket #10757: 10757.patch

File 10757.patch, 1.2 KB (added by hakre, 14 years ago)
  • wp-includes/rss.php

     
    112112                        }
    113113                        elseif ( $el == 'rss' ) {
    114114                                $this->feed_type = RSS;
    115                                 $this->feed_version = $attrs['version'];
     115                                $this->feed_version = isset($attrs['version']) ? $attrs['version'] : '';
    116116                        }
    117117                        elseif ( $el == 'feed' ) {
    118118                                $this->feed_type = ATOM;
    119                                 $this->feed_version = $attrs['version'];
     119                                $this->feed_version = isset($attrs['version']) ? $attrs['version'] : '';
    120120                                $this->inchannel = true;
    121121                        }
    122122                        return;
     
    336336                        }
    337337                }
    338338                elseif ( $this->is_rss() ) {
    339                         $this->channel['tagline'] = $this->channel['description'];
     339                        $this->channel['tagline'] = isset($this->channel['description']) ? $this->channel['description'] : '';                 
    340340                        for ( $i = 0; $i < count($this->items); $i++) {
    341341                                $item = $this->items[$i];
    342342                                if ( isset($item['description']))
     
    490490                        }
    491491                        else {
    492492                                $errormsg = "Failed to fetch $url. ";
    493                                 if ( $resp->error ) {
     493                                if ( isset($resp->error) && $resp->error ) {
    494494                                        # compensate for Snoopy's annoying habbit to tacking
    495495                                        # on '\n'
    496496                                        $http_error = substr($resp->error, 0, -2);