Skip to content

Commit cdd8aea

Browse files
committed
🚿 force int because PHP8.1 hates this
1 parent 14b6f82 commit cdd8aea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Data/AlphaNum.php

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

115115
$nextTwoCharsBits = $bitBuffer->read(11);
116-
$result .= $toAlphaNumericChar($nextTwoCharsBits / 45);
116+
$result .= $toAlphaNumericChar((int)($nextTwoCharsBits / 45));
117117
$result .= $toAlphaNumericChar($nextTwoCharsBits % 45);
118118
$length -= 2;
119119
}

src/Data/Kanji.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public static function decodeSegment(BitBuffer $bitBuffer, int $versionNumber):s
128128
while($length > 0){
129129
// Each 13 bits encodes a 2-byte character
130130
$twoBytes = $bitBuffer->read(13);
131-
$assembledTwoBytes = (($twoBytes / 0x0c0) << 8) | ($twoBytes % 0x0c0);
131+
$assembledTwoBytes = ((int)($twoBytes / 0x0c0) << 8) | ($twoBytes % 0x0c0);
132132

133133
$assembledTwoBytes += ($assembledTwoBytes < 0x01f00)
134134
? 0x08140 // In the 0x8140 to 0x9FFC range

0 commit comments

Comments
 (0)