We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d5e9c36 + 4c898dc commit 169d8e4Copy full SHA for 169d8e4
1 file changed
src/Prometheus/Storage/Redis.php
@@ -150,11 +150,11 @@ private function connectToServer(): void
150
if ($this->options['persistent_connections']) {
151
$connection_successful = $this->redis->pconnect(
152
$this->options['host'],
153
- $this->options['port'],
154
- $this->options['timeout']
+ (int) $this->options['port'],
+ (float) $this->options['timeout']
155
);
156
} else {
157
- $connection_successful = $this->redis->connect($this->options['host'], $this->options['port'], $this->options['timeout']);
+ $connection_successful = $this->redis->connect($this->options['host'], (int) $this->options['port'], (float) $this->options['timeout']);
158
}
159
if (!$connection_successful) {
160
throw new StorageException("Can't connect to Redis server", 0);
0 commit comments