summaryrefslogtreecommitdiffstats
path: root/fetcher
diff options
context:
space:
mode:
Diffstat (limited to 'fetcher')
-rw-r--r--fetcher/feedfetcher.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/fetcher/feedfetcher.php b/fetcher/feedfetcher.php
index a3a2ab8bb..aa6a465b3 100644
--- a/fetcher/feedfetcher.php
+++ b/fetcher/feedfetcher.php
@@ -62,10 +62,13 @@ class FeedFetcher implements IFeedFetcher {
$modified = $resource->getLastModified();
$etag = $resource->getEtag();
+ if (!$resource->isModified()) {
+ return [null, null];
+ }
+
try {
$parser = $this->reader->getParser();
- // TBD: if ($resource->isModified()) { }
if (!$parser) {
throw new \Exception(
'Could not find a valid feed at url ' . $url
@@ -83,7 +86,6 @@ class FeedFetcher implements IFeedFetcher {
$link = $parsedFeed->getUrl();
foreach($parsedFeed->getItems() as $item) {
- //throw new \Exception($resource->getEncoding() . '' . $item->getContent());
$items[] = $this->buildItem($item);
}