Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Haertl <jus@bitgrid.net>2016-11-22 14:12:59 +0300
committerJulius Haertl <jus@bitgrid.net>2016-11-22 14:12:59 +0300
commit6c4664bc8201f010671d4b672e8be2ff6beb1174 (patch)
tree9dfc448323071c3b93db4f53030d56f7f65b2a62 /apps/theming/lib/Controller
parent08ef7356f67ff0d6c306633d55cb63183296ed57 (diff)
Workaround for PHP bug when calling imagescale
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/lib/Controller')
-rw-r--r--apps/theming/lib/Controller/ThemingController.php4
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);