Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 14829)
+++ wp-admin/includes/template.php	(working copy)
@@ -2685,19 +2685,22 @@
  *
  * @since unknown
  *
- * @param unknown_type $size
- * @return unknown
+ * @param string $size bytes as shorthand byte values
+ * @return int bytes
  */
 function wp_convert_hr_to_bytes( $size ) {
-	$size = strtolower($size);
-	$bytes = (int) $size;
-	if ( strpos($size, 'k') !== false )
-		$bytes = intval($size) * 1024;
-	elseif ( strpos($size, 'm') !== false )
-		$bytes = intval($size) * 1024 * 1024;
-	elseif ( strpos($size, 'g') !== false )
-		$bytes = intval($size) * 1024 * 1024 * 1024;
-	return $bytes;
+	$size = trim( $size );
+	$last = strtolower( $size[strlen( $size )-1] );
+	switch($last) {
+        // The 'G' modifier is available since PHP 5.1.0
+        case 'g':
+            $size *= 1024;
+        case 'm':
+            $size *= 1024;
+        case 'k':
+            $size *= 1024;
+    }
+    return $size;
 }
 
 /**
