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

fix(import): cast description's SimpleXMLElement to string

Podcast import crashed because of type errors
parent 4e76266d
No related branches found
No related tags found
1 merge request!152fix(import): cast description's SimpleXMLElement to string
Pipeline #1011 passed
......@@ -308,7 +308,7 @@ class PodcastImportController extends BaseController
$slug = slugify(
$this->request->getPost('slug_field') === 'title'
? (string) $item->title
: basename($item->link),
: basename((string) $item->link),
);
if (in_array($slug, $slugs, true)) {
$slugNumber = 2;
......@@ -319,10 +319,10 @@ class PodcastImportController extends BaseController
}
$slugs[] = $slug;
$itemDescriptionHtml = match ($this->request->getPost('description_field')) {
'content' => $nsContent->encoded,
'summary' => $nsItunes->summary,
'content' => (string) $nsContent->encoded,
'summary' => (string) $nsItunes->summary,
'subtitle_summary' => $nsItunes->subtitle . '<br/>' . $nsItunes->summary,
default => $item->description,
default => (string) $item->description,
};
if (
......
......@@ -4510,6 +4510,11 @@
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
},
"bin": {
"sshpk-conv": "bin/sshpk-conv",
"sshpk-sign": "bin/sshpk-sign",
"sshpk-verify": "bin/sshpk-verify"
},
"engines": {
"node": ">=0.10.0"
}
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