Skip to content

Commit f7521c9

Browse files
committed
🚿 force int because PHP8.1 hates this
1 parent 43e1663 commit f7521c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Data/Number.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public static function decodeSegment(BitBuffer $bitBuffer, int $versionNumber):s
143143
}
144144

145145
$result .= $toNumericChar((int)($threeDigitsBits / 100));
146-
$result .= $toNumericChar(($threeDigitsBits / 10) % 10);
146+
$result .= $toNumericChar((int)($threeDigitsBits / 10) % 10);
147147
$result .= $toNumericChar($threeDigitsBits % 10);
148148

149149
$length -= 3;

src/Decoder/Binarizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private function calculateBlackPoints(array $luminances, int $subWidth, int $sub
252252
// finish the rest of the rows quickly
253253
for($yy++, $offset += $width; $yy < self::BLOCK_SIZE; $yy++, $offset += $width){
254254
for($xx = 0; $xx < self::BLOCK_SIZE; $xx++){
255-
$sum += $luminances[$offset + $xx] & 0xff;
255+
$sum += $luminances[(int)($offset + $xx)] & 0xff;
256256
}
257257
}
258258
}

0 commit comments

Comments
 (0)