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:
parent
c8039d483b
commit
e5729fdaac
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user