mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-12 11:34:09 +02:00
fix: bug in prior refactor (#4179)
* fix: bug in prior refactor * fix deprecation notice
This commit is contained in:
@@ -112,6 +112,15 @@ class DisplayAction implements ActionInterface
|
||||
$input = array_diff_key($requestArray, array_fill_keys($remove, ''));
|
||||
$bridge->setInput($input);
|
||||
$bridge->collectData();
|
||||
$items = $bridge->getItems();
|
||||
if (isset($items[0]) && is_array($items[0])) {
|
||||
$feedItems = [];
|
||||
foreach ($items as $item) {
|
||||
$feedItems[] = FeedItem::fromArray($item);
|
||||
}
|
||||
$items = $feedItems;
|
||||
}
|
||||
$feed = $bridge->getFeed();
|
||||
} catch (\Exception $e) {
|
||||
// Probably an exception inside a bridge
|
||||
if ($e instanceof HttpException) {
|
||||
@@ -145,16 +154,6 @@ class DisplayAction implements ActionInterface
|
||||
}
|
||||
}
|
||||
|
||||
$items = $bridge->getItems();
|
||||
if (isset($items[0]) && is_array($items[0])) {
|
||||
$feedItems = [];
|
||||
foreach ($items as $item) {
|
||||
$feedItems[] = FeedItem::fromArray($item);
|
||||
}
|
||||
$items = $feedItems;
|
||||
}
|
||||
$feed = $bridge->getFeed();
|
||||
|
||||
$formatFactory = new FormatFactory();
|
||||
$format = $formatFactory->create($format);
|
||||
|
||||
|
Reference in New Issue
Block a user