mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-23 01:55:27 +03:00
fix: give better error message when feed can't be parsed (#2618)
This commit is contained in:
parent
c3a106892d
commit
dbee47f1d6
1 changed files with 4 additions and 0 deletions
|
@ -95,6 +95,10 @@ abstract class FeedExpander extends BridgeAbstract {
|
|||
or returnServerError('Could not request ' . $url);
|
||||
$rssContent = simplexml_load_string(trim($content));
|
||||
|
||||
if ($rssContent === false) {
|
||||
throw new \Exception('Unable to parse string as xml');
|
||||
}
|
||||
|
||||
Debug::log('Detecting feed format/version');
|
||||
switch(true) {
|
||||
case isset($rssContent->item[0]):
|
||||
|
|
Loading…
Reference in a new issue