mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 13:50:23 +02:00
refactor (#3746)
This commit is contained in:
@@ -6,7 +6,10 @@ final class FeedParser
|
||||
{
|
||||
public function parseFeed(string $xmlString): array
|
||||
{
|
||||
libxml_use_internal_errors(true);
|
||||
$xml = simplexml_load_string(trim($xmlString));
|
||||
$xmlErrors = libxml_get_errors();
|
||||
libxml_use_internal_errors(false);
|
||||
if ($xml === false) {
|
||||
throw new \Exception('Unable to parse xml');
|
||||
}
|
||||
|
Reference in New Issue
Block a user