Skip to content

Commit 68893b1

Browse files
committed
fix: PHP_INT_SIZE is 8 on 64bits, not 4
The ternary was reversed because of this typo. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent cf73ade commit 68893b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/ServerInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getServerId(): int {
2525
if ($serverid < 1) {
2626
// Fallback: generates a server ID based on hostname
2727
/** @var int<0,max> */
28-
$serverid = PHP_INT_SIZE === 4
28+
$serverid = PHP_INT_SIZE === 8
2929
? hexdec(hash('xxh32', $this->getHostname()))
3030
// Makes sure it doesn't overflow 32 bits int
3131
: hexdec(substr(hash('xxh32', $this->getHostname()), -3));

0 commit comments

Comments
 (0)