[BUGFIX] Avoid error message on unlimited upload_max_filesize
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / ResourceStorage.php
index 3a53889..208bc49 100644 (file)
@@ -938,7 +938,7 @@ class ResourceStorage implements ResourceStorageInterface
         }
         // Max upload size (kb) for files.
         $maxUploadFileSize = GeneralUtility::getMaxUploadFileSize() * 1024;
-        if ($uploadedFileSize >= $maxUploadFileSize) {
+        if ($maxUploadFileSize > 0 && $uploadedFileSize >= $maxUploadFileSize) {
             unlink($localFilePath);
             throw new Exception\UploadSizeException('The uploaded file exceeds the size-limit of ' . $maxUploadFileSize . ' bytes', 1322110041);
         }