Fixed bug #16022: Size calculation function can only deal with integers
authorBenni Mack <benni.mack@typo3.org>
Sun, 17 Oct 2010 09:48:48 +0000 (09:48 +0000)
committerBenni Mack <benni.mack@typo3.org>
Sun, 17 Oct 2010 09:48:48 +0000 (09:48 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9119 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 37ccb76..535a6d3 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
 
 2010-10-17  Benjamin Mack  <benni@typo3.org>
 
+       * Fixed bug #16022: Size calculation function can only deal with integers
        * Fixed bug #16006: Remove the checkbox that clears the input fields in TCE-forms and replace it with a sprite icon (Thanks to Jo Hasenau)
 
 2010-10-16  Steffen Gebert  <steffen@steffen-gebert.de>
index ba64db7..9805b4b 100644 (file)
@@ -3430,13 +3430,13 @@ final class t3lib_div {
         */
        public static function getBytesFromSizeMeasurement($measurement) {
                if (stripos($measurement, 'G')) {
-                       $bytes = intval($measurement) * 1024 * 1024 * 1024;
+                       $bytes = doubleval($measurement) * 1024 * 1024 * 1024;
                } else if (stripos($measurement, 'M')) {
-                       $bytes = intval($measurement) * 1024 * 1024;
+                       $bytes = doubleval($measurement) * 1024 * 1024;
                } else if (stripos($measurement, 'K')) {
-                       $bytes = intval($measurement) * 1024;
+                       $bytes = doubleval($measurement) * 1024;
                } else {
-                       $bytes = intval($measurement);
+                       $bytes = doubleval($measurement);
                }
                return $bytes;
        }