fix(twitch): Invalid argument supplied for foreach() at bridges/TwitchBridge.php line 115 (#3630)

This commit is contained in:
Dag 2023-08-22 19:47:32 +02:00 committed by GitHub
parent c5cbab1231
commit 3ac861a866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -112,7 +112,9 @@ EOD;
if (!is_null($video->game)) {
$item['categories'][] = $video->game->displayName;
}
foreach ($video->contentTags as $tag) {
$contentTags = $video->contentTags ?? [];
foreach ($contentTags as $tag) {
if (!$tag->isLanguageTag) {
$item['categories'][] = $tag->localizedName;
}