diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-11-23 17:45:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-23 17:45:59 +0100 |
commit | 5473475fa70b1bcf4d5e904d2dd978f08c79155c (patch) | |
tree | 739422301c9686c04562649b309265b8d4b5114c /apps | |
parent | 6d925507724ff403a958f60e7829200c343a960c (diff) | |
parent | 6c4664bc8201f010671d4b672e8be2ff6beb1174 (diff) | |
download | nextcloud-server-5473475fa70b1bcf4d5e904d2dd978f08c79155c.tar.gz nextcloud-server-5473475fa70b1bcf4d5e904d2dd978f08c79155c.zip |
Merge pull request #2232 from nextcloud/imagescale-fix
Workaround for PHP bug when calling imagescale
Diffstat (limited to 'apps')
-rw-r--r-- | apps/theming/lib/Controller/ThemingController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php index 58e843c5d9d..73e3ed3a4b4 100644 --- a/apps/theming/lib/Controller/ThemingController.php +++ b/apps/theming/lib/Controller/ThemingController.php @@ -211,7 +211,9 @@ class ThemingController extends Controller { $tmpFile = $this->tempManager->getTemporaryFile(); if(function_exists('imagescale')) { // FIXME: Once PHP 5.5.0 is a requirement the above check can be removed - $image = imagescale($image, 1920); + // Workaround for https://bugs.php.net/bug.php?id=65171 + $newHeight = imagesy($image)/(imagesx($image)/1920); + $image = imagescale($image, 1920, $newHeight); } imageinterlace($image, 1); imagejpeg($image, $tmpFile, 75); |