diff options
-rwxr-xr-x | lib/Fetcher/FeedFetcher.php | 4 | ||||
-rw-r--r-- | tests/Unit/Fetcher/FeedFetcherTest.php | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Fetcher/FeedFetcher.php b/lib/Fetcher/FeedFetcher.php index fd2bc4646..f3d4e0f27 100755 --- a/lib/Fetcher/FeedFetcher.php +++ b/lib/Fetcher/FeedFetcher.php @@ -266,7 +266,9 @@ class FeedFetcher implements IFeedFetcher // Use description from feed if body is not provided (by a scraper) if ($body === null) { - $body = $parsedItem->getValue("content:encoded") ?? $parsedItem->getDescription(); + $body = $parsedItem->getValue('content:encoded') + ?? $parsedItem->getContent() + ?? $parsedItem->getSummary(); } // purification is done in the service layer diff --git a/tests/Unit/Fetcher/FeedFetcherTest.php b/tests/Unit/Fetcher/FeedFetcherTest.php index 534d48fc5..2b77b00e0 100644 --- a/tests/Unit/Fetcher/FeedFetcherTest.php +++ b/tests/Unit/Fetcher/FeedFetcherTest.php @@ -573,7 +573,7 @@ class FeedFetcherTest extends TestCase ->method('getPublicId') ->will($this->returnValue($this->guid)); $this->item_mock->expects($this->exactly(1)) - ->method('getDescription') + ->method('getContent') ->will($this->returnValue($this->body)); $this->item_mock->expects($this->exactly(1)) ->method('getLastModified') |