From 9890f09e819ef7f06142be12da07a8411d4551d7 Mon Sep 17 00:00:00 2001 From: Sergio Brighenti Date: Thu, 9 Apr 2020 15:02:05 +0200 Subject: [PATCH] Fixed error with raw preview (Closes #184) --- Gruntfile.js | 2 +- app/Controllers/MediaController.php | 2 +- composer.json | 2 +- composer.lock | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 92a09f1..75d7f0c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -154,7 +154,7 @@ module.exports = function (grunt) { command: '"./vendor/bin/phpstan" analyse app resources/lang bin install' }, composer_no_dev: { - command: 'composer install --no-dev --prefer-dist' + command: 'composer update --no-dev --prefer-dist' } } diff --git a/app/Controllers/MediaController.php b/app/Controllers/MediaController.php index 8d874c1..af3fd3e 100644 --- a/app/Controllers/MediaController.php +++ b/app/Controllers/MediaController.php @@ -327,7 +327,7 @@ class MediaController extends Controller set_time_limit(0); $mime = $storage->getMimetype($media->storage_path); - if ((param($request, 'width') || param($request, 'height')) !== null && explode('/', $mime)[0] === 'image') { + if ((param($request, 'width') !== null || param($request, 'height') !== null) && explode('/', $mime)[0] === 'image') { return $this->makeThumbnail($storage, $media, param($request, 'width'), param($request, 'height'), $disposition); } else { $stream = new Stream($storage->readStream($media->storage_path)); diff --git a/composer.json b/composer.json index 6b62a0d..6feda9c 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "sergix44/xbackbone", - "version": "3.1.RC5", + "version": "3.1.RC6", "description": "A lightweight ShareX PHP backend", "type": "project", "require": { diff --git a/composer.lock b/composer.lock index 68e839c..91641bb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f9b195438102a5213e65b9aef73ad6ef", + "content-hash": "046f5b6b68e2073e25a43c0c24813053", "packages": [ { "name": "aws/aws-sdk-php",