mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-09-03 05:02:43 +02:00
fix: small tweaks (#4057)
This commit is contained in:
@@ -64,6 +64,7 @@ TEXT;
|
||||
$this->collectExpandableDatas($feed);
|
||||
} catch (HttpException $e) {
|
||||
$this->logger->warning(sprintf('Exception in FeedMergeBridge: %s', create_sane_exception_message($e)));
|
||||
// This feed item might be spammy. Considering dropping it.
|
||||
$this->items[] = [
|
||||
'title' => 'RSS-Bridge: ' . $e->getMessage(),
|
||||
// Give current time so it sorts to the top
|
||||
@@ -71,7 +72,7 @@ TEXT;
|
||||
];
|
||||
continue;
|
||||
} catch (\Exception $e) {
|
||||
if (str_starts_with($e->getMessage(), 'Unable to parse xml')) {
|
||||
if (str_starts_with($e->getMessage(), 'Failed to parse xml')) {
|
||||
// Allow this particular exception from FeedExpander
|
||||
$this->logger->warning(sprintf('Exception in FeedMergeBridge: %s', create_sane_exception_message($e)));
|
||||
continue;
|
||||
@@ -83,6 +84,8 @@ TEXT;
|
||||
}
|
||||
}
|
||||
|
||||
// If $this->items is empty we should consider throw exception here
|
||||
|
||||
// Sort by timestamp descending
|
||||
usort($this->items, function ($a, $b) {
|
||||
$t1 = $a['timestamp'] ?? $a['uri'] ?? $a['title'];
|
||||
|
Reference in New Issue
Block a user