1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 13:50:23 +02:00
This commit is contained in:
Dag
2023-10-13 01:02:19 +02:00
committed by GitHub
parent 44fb2c98bc
commit e379019db2
4 changed files with 72 additions and 57 deletions

View File

@@ -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');
}