Skip to content

Commit

Permalink
Fixing issue concretecms#5761 - allowing legacy option to get image t…
Browse files Browse the repository at this point in the history
…humbnails from strings
  • Loading branch information
deek87 committed Jul 31, 2017
1 parent 36985ec commit 8e74048
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions concrete/src/File/Image/BasicThumbnailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ public function create($mixed, $savePath, $width, $height, $fit = false, $format
*/
private function checkForThumbnailAndCreateIfNecessary($obj, $maxWidth, $maxHeight, $crop = false)
{
$storage = $obj->getFileStorageLocationObject();
if ($obj instanceof File) {
$storage = $obj->getFileStorageLocationObject();
} else {
$storage = $this->getStorageLocation();
}
$this->setStorageLocation($storage);
$filesystem = $storage->getFileSystemObject();
$configuration = $storage->getConfigurationObject();
Expand All @@ -248,7 +252,7 @@ private function checkForThumbnailAndCreateIfNecessary($obj, $maxWidth, $maxHeig
$filename = '';
}
} else {
$filename = md5(implode(':', array($obj, $maxWidth, $maxHeight, $crop, filemtime($obj))))
$filename = md5(implode(':', array($obj, $maxWidth, $maxHeight, $crop, @filemtime($obj))))
. '.' . $fh->getExtension($obj);
}

Expand Down

0 comments on commit 8e74048

Please sign in to comment.