Changeset 358

Show
Ignore:
Timestamp:
03/07/06 11:16:01
Author:
miyagawa
Message:

better error handling on Atom 1.0 date

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm

    r357 r358  
    9292        # xxx nasty hack. We should remove this once XML::Atom or XML::Feed is fixed 
    9393        if (!$entry->date && $remote->format eq 'Atom' && $e->{entry}->version eq '1.0') { 
    94             my $published = $e->{entry}->published; 
    95             if ($published) { 
    96                 my $dt = XML::Atom::Util::iso2dt($published); 
    97                 $entry->date( Plagger::Date->rebless($dt) ); 
     94            if ( $e->{entry}->published ) { 
     95                my $dt = XML::Atom::Util::iso2dt( $e->{entry}->published ); 
     96                $entry->date( Plagger::Date->rebless($dt) ) if $dt; 
    9897            } 
    9998        }