diff --git a/bridges/PatreonBridge.php b/bridges/PatreonBridge.php index d72bde20..a2162425 100644 --- a/bridges/PatreonBridge.php +++ b/bridges/PatreonBridge.php @@ -135,7 +135,7 @@ class PatreonBridge extends BridgeAbstract $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 @@ class PatreonBridge extends BridgeAbstract $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 @@ class PatreonBridge extends BridgeAbstract $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 @@ class PatreonBridge extends BridgeAbstract $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}


"; }