We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 53dcc75 + 9c20044 commit 65d38a1Copy full SHA for 65d38a1
cache.php
@@ -103,14 +103,14 @@ function machine_size( $val ) {
103
$val = (int) substr($val, 0, -1);
104
}
105
106
- switch($last) {
107
- case 'g':
108
- $val *= 1024;
109
- case 'm':
110
111
- case 'k':
112
113
- }
+ if ($last == 'g')
+ $val *= (1024 * 1024 * 1024);
+
+ if ($last == 'm')
+ $val *= (1024 * 1024);
+ if ($last == 'k')
+ $val *= 1024;
114
115
return $val;
116
0 commit comments