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 a9a1cf1 commit 33a0447Copy full SHA for 33a0447
src/EnumSet.php
@@ -202,7 +202,7 @@ public function rewind()
202
*/
203
private function doRewindBin()
204
{
205
- if (trim($this->bitset, "\0") !== '') {
+ if (ltrim($this->bitset, "\0") !== '') {
206
$this->ordinal = -1;
207
$this->next();
208
} else {
@@ -620,7 +620,7 @@ private function doSetBinaryBitsetLeBin($bitset)
620
// add "\0" if the given bitset is not long enough
621
$bitset .= str_repeat("\0", $size - $sizeIn);
622
} elseif ($sizeIn > $size) {
623
- if (trim(substr($bitset, $size), "\0") !== '') {
+ if (ltrim(substr($bitset, $size), "\0") !== '') {
624
throw new InvalidArgumentException('Out-Of-Range bits detected');
625
}
626
$bitset = substr($bitset, 0, $size);
0 commit comments