Fix for installs that don't use the cloud drivers

This commit is contained in:
Luke Towers 2019-05-31 01:03:07 -06:00
parent ef4f1e49ee
commit e87184d2bd
1 changed files with 3 additions and 3 deletions

View File

@ -66,12 +66,12 @@ class Files extends Controller
$url = null;
$disk = $file->getDisk();
$adapter = $disk->getAdapter();
if ($adapter instanceof \League\Flysystem\Cached\CachedAdapter) {
if (class_exists('\League\Flysystem\Cached\CachedAdapter') && $adapter instanceof \League\Flysystem\Cached\CachedAdapter) {
$adapter = $adapter->getAdapter();
}
if (($adapter instanceof \League\Flysystem\AwsS3v3\AwsS3Adapter) ||
($adapter instanceof \League\Flysystem\Rackspace\RackspaceAdapter) ||
if ((class_exists('\League\Flysystem\AwsS3v3\AwsS3Adapter') && $adapter instanceof \League\Flysystem\AwsS3v3\AwsS3Adapter) ||
(class_exists('\League\Flysystem\Rackspace\RackspaceAdapter') && $adapter instanceof \League\Flysystem\Rackspace\RackspaceAdapter) ||
method_exists($adapter, 'getTemporaryUrl')
) {
if (empty($path)) {