Skip to content
Snippets Groups Projects
Commit ac5336fb authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(import): check for empty string when generating podcast guid for feeds not including one

parent 1001ec6b
No related branches found
No related tags found
No related merge requests found
...@@ -502,7 +502,10 @@ class PodcastModel extends Model ...@@ -502,7 +502,10 @@ class PodcastModel extends Model
*/ */
protected function setPodcastGUID(array $data): array protected function setPodcastGUID(array $data): array
{ {
if (! array_key_exists('guid', $data['data']) || $data['data']['guid'] === null) { if (! array_key_exists(
'guid',
$data['data']
) || $data['data']['guid'] === null || $data['data']['guid'] === '') {
$uuid = service('uuid'); $uuid = service('uuid');
$feedUrl = url_to('podcast-rss-feed', $data['data']['handle']); $feedUrl = url_to('podcast-rss-feed', $data['data']['handle']);
// 'ead4c236-bf58-58c6-a2c6-a6b28d128cb6' is the uuid of the podcast namespace // 'ead4c236-bf58-58c6-a2c6-a6b28d128cb6' is the uuid of the podcast namespace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment