From dc80277806e2c90b5401840b3918ab8a2a84bb8d Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 15 Feb 2015 13:56:40 +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 6a2bae9e1a..4b7e210456 100644 --- a/wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php +++ b/wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php @@ -263,7 +263,7 @@ class AttachmentAction extends AbstractDatabaseObjectAction { $adapter = ImageHandler::getInstance()->getAdapter(); // check memory limit - $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)) { continue; } -- 2.20.1