[index] Fix error when no items defined (#983)

Fix PHP Notice:  Undefined offset: 0. Error below triggers when there are no items:

PHP Notice:  Undefined offset: 0 in C:\php\rss-bridge\index.php on line 249
This commit is contained in:
triatic 2018-12-28 15:25:56 +00:00 committed by LogMANOriginal
parent 719320e1a4
commit 3e45643418

View file

@ -246,7 +246,7 @@ try {
// Transform "legacy" items to FeedItems if necessary.
// Remove this code when support for "legacy" items ends!
if(is_array($items[0])) {
if(isset($items[0]) && is_array($items[0])) {
$feedItems = array();
foreach($items as $item) {