We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc15efe commit ef21b2dCopy full SHA for ef21b2d
src/EnumSet.php
@@ -641,7 +641,7 @@ private function doSetBinaryBitsetLeBin(string $bitset): void
641
// truncate out-of-range bits of last byte
642
$lastByteMaxOrd = $this->ordinalMax % 8;
643
if ($lastByteMaxOrd !== 0) {
644
- $lastByte = $bitset[$size - 1];
+ $lastByte = $bitset[-1];
645
$lastByteExpected = \chr((1 << $lastByteMaxOrd) - 1) & $lastByte;
646
if ($lastByte !== $lastByteExpected) {
647
throw new InvalidArgumentException('out-of-range bits detected');
0 commit comments