Skip to content

Commit

Permalink
Bug fix version 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mikahanninen committed Jun 11, 2017
1 parent 1aef191 commit 8189509
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.6.1
## 06/11/2017

1. [](#bugfix)
* Fix for posts without any images

# v1.6.0
## 06/08/2017

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Facebook
version: 1.6.0
version: 1.6.1
description: "**Facebook** is a plugin that embeds Facebook page content, album or events into your Grav website."
icon: facebook
author:
Expand Down
5 changes: 3 additions & 2 deletions facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ private function parsePostResponse($json, $config, $tags_string) {
$image_html = "";
$imageSrc = (property_exists($val, 'attachments')
&& property_exists($val->attachments->data[0], 'media'))
? $val->attachments->data[0]->media->image->src : (
property_exists($val->attachments->data[0], 'subattachments')
? $val->attachments->data[0]->media->image->src :
(property_exists($val, 'attachments')
&& property_exists($val->attachments->data[0], 'subattachments')
&& property_exists($val->attachments->data[0]->subattachments->data[0], 'media')
? $val->attachments->data[0]->subattachments->data[0]->media->image->src : null
);
Expand Down

0 comments on commit 8189509

Please sign in to comment.