Permalink
Browse files

Compatible up to ver8

  • Loading branch information...
1 parent 3067d93 commit 65bd3b4e9482280450d2ad0730fdf90a4703e625 @hissy committed Dec 18, 2016
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/Html/OpenGraphTags.php
@@ -57,15 +57,14 @@ public function insertTags($event)
}
$og_image = $page->getAttribute('og_image');
- if (!$og_image instanceof File) {
+ if (!is_object($og_image)) {
$og_image = $page->getAttribute('thumbnail');
- if (!$og_image instanceof File && !empty($thumbnailID)) {
+ if (!is_object($og_image) && !empty($thumbnailID)) {
$og_image = File::getByID($thumbnailID);
}
}
- if ($og_image instanceof File && !$og_image->isError()) {
- $fv = $og_image->getApprovedVersion();
+ if (is_object($og_image) && !$og_image->isError()) {
$og_image_width = $og_image->getAttribute('width');
$og_image_height = $og_image->getAttribute('height');
$og_image_url = $og_image->getURL();

0 comments on commit 65bd3b4

Please sign in to comment.