Skip to content

Commit 62e0b44

Browse files
committed
fix: support integer timeout
1 parent b574d5d commit 62e0b44

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/Session/Handlers/RedisHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function __construct(AppConfig $config, string $ipAddress)
8585
'port' => empty($matches[2]) ? self::REDIS_DEFAULT_PORT : $matches[2],
8686
'password' => preg_match('#auth=([^\s&]+)#', $matches[3], $match) ? $match[1] : null,
8787
'database' => preg_match('#database=(\d+)#', $matches[3], $match) ? (int) $match[1] : 0,
88-
'timeout' => preg_match('#timeout=(\d+\.\d+)#', $matches[3], $match) ? (float) $match[1] : 0,
88+
'timeout' => preg_match('#timeout=(\d+\.\d+|\d+)#', $matches[3], $match) ? (float) $match[1] : 0,
8989
];
9090

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

0 commit comments

Comments
 (0)