mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-19 13:01:19 +00:00
fix(import): cast description's SimpleXMLElement to string
Podcast import crashed because of type errors
This commit is contained in:
parent
4e76266d50
commit
02d17be4ff
@ -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 (
|
||||
|
5
package-lock.json
generated
5
package-lock.json
generated
@ -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"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user