Merge pull request 'fix get_name() on null error' (#1) from 1337soundwave1337/podcast-feed-parser:master into master

Reviewed-on: #1
This commit is contained in:
Evgeny Kuchuk 2022-10-05 07:24:11 +00:00
commit 0e3a54a6c4

View File

@ -320,9 +320,13 @@ class Parser
$episode = new Episode();
$episode->setTitle($item->get_title())
->setDescription($item->get_description())
->setAuthor($item->get_author()->get_name())
->setLink($item->get_link());
$author = $item->get_author();
if (!is_null($author)) {
$episode->setAuthor($author->get_name());
}
if ($this->config->shouldDefaultToToday()) {
$episode->setPublishedDate(new \DateTime($item->get_date()));
} else {