diff options
author | anoy <anoymouserver+github@mailbox.org> | 2021-04-21 08:00:25 +0200 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-24 14:21:57 +0200 |
commit | 91db7113a8d844eb7d0e91596f8632e82210b6f6 (patch) | |
tree | 970de5c300fc4f611605c985772ac88bfbf8c0e6 | |
parent | 215890fa0788d3d68f3d23b9718dd71965fcbede (diff) |
replace deprecated getDescription call
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
-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') |