From ae13866e178223c8603c852cb3977405f2eb472b Mon Sep 17 00:00:00 2001 From: mruac Date: Fri, 22 Sep 2023 16:43:52 +0930 Subject: [PATCH] resolve comment https://github.com/RSS-Bridge/rss-bridge/pull/3617#issuecomment-1730244049 --- bridges/PatreonBridge.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bridges/PatreonBridge.php b/bridges/PatreonBridge.php index d72bde20205..a21624253c1 100644 --- a/bridges/PatreonBridge.php +++ b/bridges/PatreonBridge.php @@ -135,7 +135,7 @@ public function collectData() $thumbnail = $post->attributes->thumbnail->large ?? null; $thumbnail = $thumbnail ?? $post->attributes->thumbnail->url ?? null; $thumbnail = $thumbnail ?? $post->attributes->image->thumb_url ?? null; - $thumbnail = $thumbnail ?? $post->attributes->image->url; + $thumbnail = $thumbnail ?? $post->attributes->image->url ?? null; $audio_filename = $audio->file_name ?? $item['title']; $download_url = $audio->download_url ?? $item['uri']; $item['content'] .= "


🎧 {$audio_filename}

"; @@ -150,7 +150,7 @@ public function collectData() $thumbnail = $post->attributes->thumbnail->large ?? null; $thumbnail = $thumbnail ?? $post->attributes->thumbnail->url ?? null; $thumbnail = $thumbnail ?? $post->attributes->image->thumb_url ?? null; - $thumbnail = $thumbnail ?? $post->attributes->image->url; + $thumbnail = $thumbnail ?? $post->attributes->image->url ?? null; $item['content'] .= "

🎬 {$item['title']}

"; break; @@ -158,7 +158,7 @@ public function collectData() $thumbnail = $post->attributes->thumbnail->large ?? null; $thumbnail = $thumbnail ?? $post->attributes->thumbnail->url ?? null; $thumbnail = $thumbnail ?? $post->attributes->image->thumb_url ?? null; - $thumbnail = $thumbnail ?? $post->attributes->image->url; + $thumbnail = $thumbnail ?? $post->attributes->image->url ?? null; $item['content'] .= "

🎬 {$item['title']}

"; break; @@ -166,9 +166,9 @@ public function collectData() $item['content'] .= '

'; foreach ($post->relationships->images->data as $key => $image) { $image = $this->findInclude($posts, 'media', $image->id)->attributes; - $image_fullres = $image->download_url ?? $image->image_urls->url ?? $image->image_urls->original; + $image_fullres = $image->download_url ?? $image->image_urls->url ?? $image->image_urls->original ?? null; $filename = $image->file_name ?? ''; - $image_url = $image->image_urls->url ?? $image->image_urls->original; + $image_url = $image->image_urls->url ?? $image->image_urls->original ?? null; $item['enclosures'][] = $image_fullres; $item['content'] .= "{$filename}


"; }