Skip to content

Commit a60bf85

Browse files
committed
fixup! feat(snowflake): Use string as type for snowflake ids
1 parent 4d4a443 commit a60bf85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/DB/Snowflake/SnowflakeGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function nextId(): string {
115115
return gmp_strval($id);
116116
} else {
117117
// Faster version for 64-bits machine using bits-shifts
118-
return (string)((($currentTime - $timestamp) << $timestampLeftMoveLength)
118+
return (string)(((int)($currentTime - $timestamp) << $timestampLeftMoveLength)
119119
| ($this->datacenter << $datacenterLeftMoveLength)
120120
| ($this->workerId << $workerLeftMoveLength)
121121
| ((int)$this->isCLI << $isCLILeftMoveLength)

0 commit comments

Comments
 (0)