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

ChangeLog
t3lib/class.t3lib_div.php

index a65ee8b..b7434d7 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-17  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #16022: Size calculation function can only deal with integers
+
 2010-10-16  Benjamin Mack  <benni@typo3.org>
 
        * Fixed bug #14835: IRRE Move-Icon should have curser:move (Thanks to Georg Ringer)
index a9c911a..b2e17ec 100644 (file)
@@ -3411,13 +3411,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;
        }