From 3d1d84af4deea47004664a4cca8456afbf085bc8 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 15 Feb 2015 14:01:35 +0100 Subject: [PATCH] Fixed memory usage calculation --- .../files/lib/data/attachment/AttachmentAction.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php b/wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php index 00a492eb3c..1c68e31850 100644 --- a/wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php +++ b/wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php @@ -173,7 +173,7 @@ class AttachmentAction extends AbstractDatabaseObjectAction { $thumbnails[] = $attachment; // rotate image based on the exif data - $neededMemory = $attachment->width * $attachment->height * ($attachment->imageType == 'image/png' ? 4 : 3) * 2.1; + $neededMemory = $attachment->width * $attachment->height * ($attachment->fileType == 'image/png' ? 4 : 3) * 2.1; if (FileUtil::getMemoryLimit() == -1 || FileUtil::getMemoryLimit() > (memory_get_usage() + $neededMemory)) { $exifData = ExifUtil::getExifData($attachment->getLocation()); if (!empty($exifData)) { -- 2.20.1