diff --git a/bridges/InstagramBridge.php b/bridges/InstagramBridge.php index 2539da25..226d453e 100644 --- a/bridges/InstagramBridge.php +++ b/bridges/InstagramBridge.php @@ -101,7 +101,11 @@ class InstagramBridge extends BridgeAbstract { $mediaInfo = $data->entry_data->PostPage[0]->graphql->shortcode_media; //Process the first element, that isn't in the node graph - $caption = $mediaInfo->edge_media_to_caption->edges[0]->node->text; + if (count($mediaInfo->edge_media_to_caption->edges) > 0) { + $caption = $mediaInfo->edge_media_to_caption->edges[0]->node->text; + } else { + $caption = ''; + } $enclosures = [$mediaInfo->display_url]; $content = ''. $caption . '';