mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-28 05:54:19 +02:00
refactor (#3746)
This commit is contained in:
parent
44fb2c98bc
commit
e379019db2
4 changed files with 72 additions and 57 deletions
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue