From aa82c53dd03222c4bdf0cc99b2430451e604ec10 Mon Sep 17 00:00:00 2001 From: L3tum <9307432+L3tum@users.noreply.github.com> Date: Sun, 20 Sep 2020 14:07:53 +0200 Subject: [PATCH] Add casting (https://github.com/endclothing/prometheus_client_php/pull/48) --- src/Prometheus/Storage/Redis.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Prometheus/Storage/Redis.php b/src/Prometheus/Storage/Redis.php index 5570685..bf4007b 100644 --- a/src/Prometheus/Storage/Redis.php +++ b/src/Prometheus/Storage/Redis.php @@ -147,12 +147,12 @@ private function connectToServer(): bool if ($this->options['persistent_connections']) { return $this->redis->pconnect( $this->options['host'], - $this->options['port'], - $this->options['timeout'] + (int) $this->options['port'], + (float) $this->options['timeout'] ); } - return $this->redis->connect($this->options['host'], $this->options['port'], $this->options['timeout']); + return $this->redis->connect($this->options['host'], (int) $this->options['port'], (float) $this->options['timeout']); } catch (\RedisException $e) { return false; }