Skip to content

Commit d97d217

Browse files
committed
refactor: use 0.0 instead of 0
The timeout is float.
1 parent 07eadd2 commit d97d217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/Session/Handlers/RedisHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ protected function setSavePath(): void
9898
'port' => empty($matches[2]) ? self::REDIS_DEFAULT_PORT : $matches[2],
9999
'password' => preg_match('#auth=([^\s&]+)#', $matches[3], $match) ? $match[1] : null,
100100
'database' => preg_match('#database=(\d+)#', $matches[3], $match) ? (int) $match[1] : 0,
101-
'timeout' => preg_match('#timeout=(\d+\.\d+|\d+)#', $matches[3], $match) ? (float) $match[1] : 0,
101+
'timeout' => preg_match('#timeout=(\d+\.\d+|\d+)#', $matches[3], $match) ? (float) $match[1] : 0.0,
102102
];
103103

104104
preg_match('#prefix=([^\s&]+)#', $matches[3], $match) && $this->keyPrefix = $match[1];

0 commit comments

Comments
 (0)