fix get_name() on null error #1
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user