diff --git a/www/class/centreonGraph.class.php b/www/class/centreonGraph.class.php index 79f3f3bb869..5441fa8a096 100644 --- a/www/class/centreonGraph.class.php +++ b/www/class/centreonGraph.class.php @@ -216,9 +216,9 @@ public function __construct($user_id, $index = null, $debug = 0, $compress = nul AND cbi.config_key IN ('rrd_cached_option', 'rrd_cached')" ); while ($row = $result->fetch()) { - if ($row['config_key'] == 'rrd_cached_option') { + if ($row['config_key'] === 'rrd_cached_option') { $this->rrdCachedOptions['rrd_cached_option'] = $row['config_value']; - } elseif ($row['config_key'] == 'rrd_cached') { + } elseif ($row['config_key'] === 'rrd_cached') { $this->rrdCachedOptions['rrd_cached'] = $row['config_value']; } } @@ -1808,9 +1808,9 @@ protected function flushRrdcached($metricsId) */ $errno = 0; $errstr = ''; - if ($this->rrdCachedOptions['rrd_cached_option'] == 'tcp') { + if ($this->rrdCachedOptions['rrd_cached_option'] === 'tcp') { $sock = fsockopen('127.0.0.1', trim($this->rrdCachedOptions['rrd_cached']), $errno, $errstr); - } elseif ($this->rrdCachedOptions['rrd_cached_option'] == 'unix') { + } elseif ($this->rrdCachedOptions['rrd_cached_option'] === 'unix') { $sock = fsockopen('unix://' . trim($this->rrdCachedOptions['rrd_cached']), $errno, $errstr); } else { return false; diff --git a/www/class/centreonGraphNg.class.php b/www/class/centreonGraphNg.class.php index 23501c92edb..6adc55eb993 100644 --- a/www/class/centreonGraphNg.class.php +++ b/www/class/centreonGraphNg.class.php @@ -240,9 +240,9 @@ public function __construct($userId) ); while ($row = $stmt->fetch()) { - if ($row['config_key'] == 'rrd_cached_option') { + if ($row['config_key'] === 'rrd_cached_option') { $this->rrdCachedOptions['rrd_cached_option'] = $row['config_value']; - } elseif ($row['config_key'] == 'rrd_cached') { + } elseif ($row['config_key'] === 'rrd_cached') { $this->rrdCachedOptions['rrd_cached'] = $row['config_value']; } } @@ -1257,9 +1257,9 @@ protected function flushRrdcached($metricsId) $errno = 0; $errstr = ''; - if ($this->rrdCachedOptions['rrd_cached_option'] == 'tcp') { + if ($this->rrdCachedOptions['rrd_cached_option'] === 'tcp') { $sock = fsockopen('127.0.0.1', trim($this->rrdCachedOptions['rrd_cached']), $errno, $errstr); - } elseif ($this->rrdCachedOptions['rrd_cached_option'] == 'unix') { + } elseif ($this->rrdCachedOptions['rrd_cached_option'] === 'unix') { $sock = fsockopen('unix://' . trim($this->rrdCachedOptions['rrd_cached']), $errno, $errstr); } else { return false; diff --git a/www/class/centreonGraphStatus.class.php b/www/class/centreonGraphStatus.class.php index cde8a2eba42..86576449eac 100644 --- a/www/class/centreonGraphStatus.class.php +++ b/www/class/centreonGraphStatus.class.php @@ -142,9 +142,9 @@ public function flushRrdCached($indexData) $errno = 0; $errstr = ''; - if ($this->rrdCachedOptions['rrd_cached_option'] == 'tcp') { + if ($this->rrdCachedOptions['rrd_cached_option'] === 'tcp') { $sock = fsockopen('127.0.0.1', trim($this->rrdCachedOptions['rrd_cached']), $errno, $errstr); - } elseif ($this->rrdCachedOptions['rrd_cached_option'] == 'unix') { + } elseif ($this->rrdCachedOptions['rrd_cached_option'] === 'unix') { $sock = fsockopen('unix://' . trim($this->rrdCachedOptions['rrd_cached']), $errno, $errstr); } else { return false; @@ -222,9 +222,9 @@ protected function getRrdCachedOptions() $rrdCachedOptions = []; while ($row = $result->fetch()) { - if ($row['config_key'] == 'rrd_cached_option') { + if ($row['config_key'] === 'rrd_cached_option') { $rrdCachedOptions['rrd_cached_option'] = $row['config_value']; - } elseif ($row['config_key'] == 'rrd_cached') { + } elseif ($row['config_key'] === 'rrd_cached') { $rrdCachedOptions['rrd_cached'] = $row['config_value']; } }