diff --git a/ChangeLog b/ChangeLog index 7bd07d6347..41c6e80e71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/libraries/Util.php b/libraries/Util.php index 8606f4de91..9007e9531f 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -85,7 +85,7 @@ class Util $pow = gmp_strval(gmp_pow($base, $exp)); break; case 'pow' : - $base = (float) $base; + $base = $base; $exp = (int) $exp; $pow = pow($base, $exp); break; @@ -1461,8 +1461,7 @@ class Util $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;