Index: trunk/extensions/FeaturedFeeds/SpecialFeedItem.php |
— | — | @@ -21,7 +21,12 @@ |
22 | 22 | return; |
23 | 23 | } |
24 | 24 | $feed = $feeds[$feedName]; |
25 | | - $date = FeaturedFeeds::startOfDay( wfTimestamp( TS_UNIX, $date ) ); |
| 25 | + $timestamp = wfTimestamp( TS_UNIX, $date ); |
| 26 | + if ( !$timestamp ) { |
| 27 | + $out->showErrorPage( 'error', 'ffeed-invalid-timestamp' ); |
| 28 | + return; |
| 29 | + } |
| 30 | + $date = FeaturedFeeds::startOfDay( $timestamp ); |
26 | 31 | // First, search in the general cache |
27 | 32 | foreach ( $feed->getFeedItems() as $item ) { |
28 | 33 | if ( $item->getRawDate() == $date ) { |
Index: trunk/extensions/FeaturedFeeds/FeaturedFeeds.i18n.php |
— | — | @@ -17,6 +17,7 @@ |
18 | 18 | 'ffeed-feed-not-found' => 'Feed $1 not found', |
19 | 19 | 'ffeed-entry-not-found' => 'Feed entry for $1 not found', |
20 | 20 | 'ffeed-sidebar-section' => 'Featured content feeds', |
| 21 | + 'ffeed-invalid-timestamp' => 'Invalid feed timestamp', |
21 | 22 | |
22 | 23 | # Featured Article |
23 | 24 | 'ffeed-featured-page' => '', # do not localise |