Skip to content

Commit

Permalink
Merge pull request #25 from bummzack/pulls/fix-images
Browse files Browse the repository at this point in the history
Fix issue where `DBFile` wasn't recognized as file.
  • Loading branch information
Damian Mooyman authored Mar 8, 2018
2 parents 8f0c9e0 + 393d2a6 commit b971bff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tractorcow/silverstripe-opengraph",
"description": "Implementation of the Facebook Open Graph protocol for SilverStripe",
"type": "silverstripe-module",
"type": "silverstripe-vendormodule",
"keywords": [
"silverstripe",
"facebook",
Expand Down
3 changes: 2 additions & 1 deletion src/ObjectBuilders/OpenGraphBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace TractorCow\OpenGraph\ObjectBuilders;

use SilverStripe\Assets\Storage\DBFile;
use SilverStripe\Control\HTTP;
use SilverStripe\Core\Extensible;
use SilverStripe\Core\Injector\Injectable;
Expand Down Expand Up @@ -153,7 +154,7 @@ protected function appendMediaMetaTags(&$tags, $namespace, $value, $https = null
}

// Handle File objects
if ($value instanceof File) {
if ($value instanceof File || $value instanceof DBFile) {
if (!$value->exists()) {
return;
}
Expand Down

0 comments on commit b971bff

Please sign in to comment.