From ad8b153f2a3b1a3b1751bf63785c4950e1516e6b Mon Sep 17 00:00:00 2001 From: Yassine Doghri <yassine@doghri.fr> Date: Mon, 12 Oct 2020 15:57:01 +0000 Subject: [PATCH] fix: set episode guid upon episode creation fixes #48 --- app/Controllers/Admin/Episode.php | 1 + app/Entities/Episode.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Controllers/Admin/Episode.php b/app/Controllers/Admin/Episode.php index 5e25bd00c1..e10c40609c 100644 --- a/app/Controllers/Admin/Episode.php +++ b/app/Controllers/Admin/Episode.php @@ -111,6 +111,7 @@ class Episode extends BaseController 'podcast_id' => $this->podcast->id, 'title' => $this->request->getPost('title'), 'slug' => $this->request->getPost('slug'), + 'guid' => '', 'enclosure' => $this->request->getFile('enclosure'), 'description' => $this->request->getPost('description'), 'image' => $this->request->getFile('image'), diff --git a/app/Entities/Episode.php b/app/Entities/Episode.php index 26f0ee5c27..70ab1ed3f0 100644 --- a/app/Entities/Episode.php +++ b/app/Entities/Episode.php @@ -199,7 +199,7 @@ class Episode extends Entity ); } - public function setGuid($guid = null) + public function setGuid(string $guid) { return $this->attributes['guid'] = empty($guid) ? $this->getLink() -- GitLab