Remove PHP warning when there is no items to remove
This commit is contained in:
parent
7de72b41e4
commit
6bd2e32615
@ -577,6 +577,8 @@ function update_items($feed_id, array $items)
|
||||
|
||||
// Keep a buffer of 2 items
|
||||
// It's workaround for buggy feeds (cache issue with some Wordpress plugins)
|
||||
if (is_array($removed_items)) {
|
||||
|
||||
$items_to_remove = array_slice($removed_items, 2);
|
||||
|
||||
if (! empty($items_to_remove)) {
|
||||
@ -589,6 +591,7 @@ function update_items($feed_id, array $items)
|
||||
->remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$db->closeTransaction();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user