Skip to content

Commit

Permalink
Better account for old bolt-1 images.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobdenotter authored Jul 4, 2017
1 parent 1bc6274 commit cdbcf1a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/SEO.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,15 @@ private function findImageHelper($fieldname)
$image = '';

if ($field['type'] == 'image') {
if (isset($this->record->values[$fieldname]['file'])) {
$image = $this->record->values[$fieldname]['file'];
} else {
$image = $this->record->values[$fieldname];
$field = $this->record->values[$fieldname];
if (isset($field['file'])) {
$image = $field['file'];
} elseif (!is_array($field)) {
$image = $field;
}
} elseif ($field['type'] == 'imagelist') {
if (isset($this->record->values[$fieldname][0]['filename'])) {
$image = $this->record->values[$fieldname][0]['filename'];
if (isset($field[0]['filename'])) {
$image = $field[0]['filename'];
}
}

Expand Down

0 comments on commit cdbcf1a

Please sign in to comment.