Skip to content
Snippets Groups Projects
Commit 5c129e17 authored by Alex Barth's avatar Alex Barth
Browse files

Throw appropriate errors. Add an @ to suppress debug output when...

Throw appropriate errors. Add an @ to suppress debug output when SimpleXMLElement constructor encounters problem. Output exception message (on FeedsSource level) instead.
parent cca9e029
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
*/ */
function opml_parser_parse($raw) { function opml_parser_parse($raw) {
$feeds = $items = array(); $feeds = $items = array();
$xml = new SimpleXMLElement($raw); $xml = @ new SimpleXMLElement($raw);
$feeds['title'] = (string)current($xml->xpath('//head/title')); $feeds['title'] = (string)current($xml->xpath('//head/title'));
// @todo Make xpath case insensitive. // @todo Make xpath case insensitive.
......
...@@ -16,8 +16,6 @@ class FeedsFileFetcher extends FeedsFetcher { ...@@ -16,8 +16,6 @@ class FeedsFileFetcher extends FeedsFetcher {
*/ */
public function fetch(FeedsSource $source) { public function fetch(FeedsSource $source) {
$source_config = $source->getConfigFor($this); $source_config = $source->getConfigFor($this);
// Just return path to file, contents can be read easily with
// file_get_contents($file_path);
return new FeedsImportBatch(NULL, $source_config['source']); return new FeedsImportBatch(NULL, $source_config['source']);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment