mirror of
https://code.castopod.org/adaures/castopod
synced 2025-06-23 16:05:34 +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(
|
$slug = slugify(
|
||||||
$this->request->getPost('slug_field') === 'title'
|
$this->request->getPost('slug_field') === 'title'
|
||||||
? (string) $item->title
|
? (string) $item->title
|
||||||
: basename($item->link),
|
: basename((string) $item->link),
|
||||||
);
|
);
|
||||||
if (in_array($slug, $slugs, true)) {
|
if (in_array($slug, $slugs, true)) {
|
||||||
$slugNumber = 2;
|
$slugNumber = 2;
|
||||||
@ -319,10 +319,10 @@ class PodcastImportController extends BaseController
|
|||||||
}
|
}
|
||||||
$slugs[] = $slug;
|
$slugs[] = $slug;
|
||||||
$itemDescriptionHtml = match ($this->request->getPost('description_field')) {
|
$itemDescriptionHtml = match ($this->request->getPost('description_field')) {
|
||||||
'content' => $nsContent->encoded,
|
'content' => (string) $nsContent->encoded,
|
||||||
'summary' => $nsItunes->summary,
|
'summary' => (string) $nsItunes->summary,
|
||||||
'subtitle_summary' => $nsItunes->subtitle . '<br/>' . $nsItunes->summary,
|
'subtitle_summary' => $nsItunes->subtitle . '<br/>' . $nsItunes->summary,
|
||||||
default => $item->description,
|
default => (string) $item->description,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
5
package-lock.json
generated
5
package-lock.json
generated
@ -4510,6 +4510,11 @@
|
|||||||
"safer-buffer": "^2.0.2",
|
"safer-buffer": "^2.0.2",
|
||||||
"tweetnacl": "~0.14.0"
|
"tweetnacl": "~0.14.0"
|
||||||
},
|
},
|
||||||
|
"bin": {
|
||||||
|
"sshpk-conv": "bin/sshpk-conv",
|
||||||
|
"sshpk-sign": "bin/sshpk-sign",
|
||||||
|
"sshpk-verify": "bin/sshpk-verify"
|
||||||
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user