Fixed memory usage calculation
authorMarcel Werk <burntime@woltlab.com>
Sun, 15 Feb 2015 13:01:35 +0000 (14:01 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sun, 15 Feb 2015 13:01:35 +0000 (14:01 +0100)
wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php

index 00a492eb3c1fff767f39adead1f80d69eb8e1cc0..1c68e3185026145cd97f13bbf127c16ad41911d4 100644 (file)
@@ -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)) {