mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-02 14:29:11 +02: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
2 changed files with 9 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue