Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/QA_4_6' into QA_4_6
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Jul 29, 2016
2 parents 62ad40e + b27020f commit 7d57024
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -12,6 +12,7 @@ phpMyAdmin - ChangeLog
- issue #12414 Fixed rendering of Original theme
- issue #12413 Fixed deleting users in non English locales
- issue #12416 Fixed replication status output in Databases listing
- issue #12303 Avoid typecasting to float when not needed

4.6.3 (2016-06-23)
- issue #12249 Fixed cookie path on Windows
Expand Down
5 changes: 2 additions & 3 deletions libraries/Util.php
Expand Up @@ -85,7 +85,7 @@ public static function pow($base, $exp, $use_function = '')
$pow = gmp_strval(gmp_pow($base, $exp));
break;
case 'pow' :
$base = (float) $base;
$base = $base;
$exp = (int) $exp;
$pow = pow($base, $exp);
break;
Expand Down Expand Up @@ -1461,8 +1461,7 @@ public static function formatByteDown($value, $limes = 6, $comma = 0)
$unit = $byteUnits[0];

for ($d = 6, $ex = 15; $d >= 1; $d--, $ex-=3) {
// cast to float to avoid overflow
$unitSize = (float) $li * self::pow(10, $ex);
$unitSize = $li * self::pow(10, $ex);
if (isset($byteUnits[$d]) && $value >= $unitSize) {
// use 1024.0 to avoid integer overflow on 64-bit machines
$value = round($value / (self::pow(1024, $d) / $dh)) /$dh;
Expand Down

0 comments on commit 7d57024

Please sign in to comment.