Skip to content

Commit

Permalink
fix(twitch): Invalid argument supplied for foreach() at bridges/Twitc…
Browse files Browse the repository at this point in the history
…hBridge.php line 115 (#3630)
  • Loading branch information
dvikan authored Aug 22, 2023
1 parent c5cbab1 commit 3ac861a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bridges/TwitchBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ public function collectData()
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;
}
Expand Down

0 comments on commit 3ac861a

Please sign in to comment.