Skip to content

Commit

Permalink
Prevent notice in RssRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
mattab committed Jan 5, 2014
1 parent 5c6be67 commit 171d34b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/ExampleRssWidget/RssRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ public function get()
$output = '<div style="padding:10px 15px;"><ul class="rss">';
$i = 0;

foreach ($rss->channel->item as $post) {
$items = array();
if(is_array($items)) {
$items = $rss->channel->item;
}
foreach ($items as $post) {
$title = $post->title;
$date = @strftime("%B %e, %Y", strtotime($post->pubDate));
$link = $post->link;
Expand Down

0 comments on commit 171d34b

Please sign in to comment.