forked from blallo/rss-bridge
Merge pull request #535 from Frenzie/filterbridge
[FeedExpander] Deal with empty item
This commit is contained in:
commit
341010b391
1 changed files with 12 additions and 3 deletions
|
@ -48,7 +48,10 @@ abstract class FeedExpander extends BridgeAbstract {
|
||||||
$this->load_RSS_2_0_feed_data($rssContent->channel[0]);
|
$this->load_RSS_2_0_feed_data($rssContent->channel[0]);
|
||||||
foreach($rssContent->item as $item){
|
foreach($rssContent->item as $item){
|
||||||
debugMessage('parsing item ' . var_export($item, true));
|
debugMessage('parsing item ' . var_export($item, true));
|
||||||
$this->items[] = $this->parseItem($item);
|
$tmp_item = $this->parseItem($item);
|
||||||
|
if (!empty($tmp_item)) {
|
||||||
|
$this->items[] = $tmp_item;
|
||||||
|
}
|
||||||
if($maxItems !== -1 && count($this->items) >= $maxItems) break;
|
if($maxItems !== -1 && count($this->items) >= $maxItems) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +65,10 @@ abstract class FeedExpander extends BridgeAbstract {
|
||||||
$this->load_RSS_2_0_feed_data($rssContent);
|
$this->load_RSS_2_0_feed_data($rssContent);
|
||||||
foreach($rssContent->item as $item){
|
foreach($rssContent->item as $item){
|
||||||
debugMessage('parsing item ' . var_export($item, true));
|
debugMessage('parsing item ' . var_export($item, true));
|
||||||
$this->items[] = $this->parseItem($item);
|
$tmp_item = $this->parseItem($item);
|
||||||
|
if (!empty($tmp_item)) {
|
||||||
|
$this->items[] = $tmp_item;
|
||||||
|
}
|
||||||
if($maxItems !== -1 && count($this->items) >= $maxItems) break;
|
if($maxItems !== -1 && count($this->items) >= $maxItems) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +77,10 @@ abstract class FeedExpander extends BridgeAbstract {
|
||||||
$this->load_ATOM_feed_data($content);
|
$this->load_ATOM_feed_data($content);
|
||||||
foreach($content->entry as $item){
|
foreach($content->entry as $item){
|
||||||
debugMessage('parsing item ' . var_export($item, true));
|
debugMessage('parsing item ' . var_export($item, true));
|
||||||
$this->items[] = $this->parseItem($item);
|
$tmp_item = $this->parseItem($item);
|
||||||
|
if (!empty($tmp_item)) {
|
||||||
|
$this->items[] = $tmp_item;
|
||||||
|
}
|
||||||
if($maxItems !== -1 && count($this->items) >= $maxItems) break;
|
if($maxItems !== -1 && count($this->items) >= $maxItems) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue