From 3ac861a86681b480fd194e102713044c485c57c0 Mon Sep 17 00:00:00 2001 From: Dag Date: Tue, 22 Aug 2023 19:47:32 +0200 Subject: [PATCH] fix(twitch): Invalid argument supplied for foreach() at bridges/TwitchBridge.php line 115 (#3630) --- bridges/TwitchBridge.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bridges/TwitchBridge.php b/bridges/TwitchBridge.php index 8976174a..146fed3d 100644 --- a/bridges/TwitchBridge.php +++ b/bridges/TwitchBridge.php @@ -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; }