diff --git a/src/Entity/Podcast.php b/src/Entity/Podcast.php index 83dd65f..8463e87 100644 --- a/src/Entity/Podcast.php +++ b/src/Entity/Podcast.php @@ -2,6 +2,7 @@ namespace App\Entity; +use App\Constants; use App\Repository\PodcastRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; @@ -41,7 +42,7 @@ class Podcast private string $email; #[ORM\Column(length: 255, nullable: true)] - private string $logoFilename; + private ?string $logoFilename; public function __construct() { @@ -165,12 +166,12 @@ class Podcast return $this; } - public function getLogoFilename(): string + public function getLogoFilename(): ?string { return $this->logoFilename; } - public function setLogoFilename(string $logoFilename): self + public function setLogoFilename(?string $logoFilename): self { $this->logoFilename = $logoFilename; diff --git a/src/Service/FeedService.php b/src/Service/FeedService.php index 6cabb3c..ee67474 100644 --- a/src/Service/FeedService.php +++ b/src/Service/FeedService.php @@ -44,10 +44,10 @@ class FeedService $channelElement->appendChild(new DOMElement('description', $podcast->getDescription())); $channelElement->appendChild(new DOMElement('link', $podcast->getWebsite())); $imageElement = new DOMElement('image'); + $channelElement->appendChild($imageElement); $imageElement->appendChild(new DOMElement('url', $podcast->getLogoUrl())); $imageElement->appendChild(new DOMElement('title', 'logo')); $imageElement->appendChild(new DOMElement('link', $podcast->getWebsite())); - $channelElement->appendChild($imageElement); $episodes = $this->entityManager->createQuery( 'SELECT e FROM App\Entity\Episode e'