1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-01-17 14:18:35 +01:00

[YouTubeCommunityTabBridge] Fix PHP warnings for posts w/o text (#3536)

Because "contentText" is always present, PHP warnings were previously
generated for posts without text.
Existence of sub-property "runs" gets checked now to avoid this.
This commit is contained in:
Thomas 2023-07-15 15:18:09 +02:00 committed by GitHub
parent c8039d483b
commit e5729fdaac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@ class YouTubeCommunityTabBridge extends BridgeAbstract
$item['author'] = $details->authorText->runs[0]->text;
$item['content'] = '';
if (isset($details->contentText)) {
if (isset($details->contentText->runs)) {
$text = $this->getText($details->contentText->runs);
$this->itemTitle = $this->ellipsisTitle($text);