Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2025-12-09 14:19:38 +00:00
parent cd2701f83d
commit b7551996ef
2 changed files with 1 additions and 7 deletions

View File

@ -14184,12 +14184,6 @@ parameters:
count: 1
path: src/Util.php
-
message: '#^Offset int\<1, 6\> on array\{string, string, string, string, string, string, string\} in isset\(\) always exists and is not nullable\.$#'
identifier: isset.offset
count: 1
path: src/Util.php
-
message: '#^Only booleans are allowed in a negated boolean, int\<0, 2\> given\.$#'
identifier: booleanNot.exprNotBoolean

View File

@ -330,7 +330,7 @@ class Util
/** @infection-ignore-all */
for ($d = 6, $ex = 15; $d >= 1; $d--, $ex -= 3) {
$unitSize = $li * 10 ** $ex;
if (isset($byteUnits[$d]) && $value >= $unitSize) {
if ($value >= $unitSize) {
// use 1024.0 to avoid integer overflow on 64-bit machines
$value = round($value / (1024 ** $d / $dh)) / $dh;
$unit = $byteUnits[$d];