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:
		
						commit
						0e3a54a6c4
					
				| 
						 | 
				
			
			@ -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