Fix services with scripts inheriting DS from previous service on detail view (#10142)

Ensures check_ds variable is always null on each run of loop that displays services graphs. Fixes services that have script (like check_dns) but don't set check_dns on their own inheriting check_dns from previous service that ran (for example check_icmp) and displaying additional bogus graphs as result.
This commit is contained in:
CirnoT
2019-04-28 10:27:36 +02:00
committed by PipoCanaja
parent 7609253a13
commit a7ef43359f

View File

@@ -99,6 +99,7 @@ if (count($services) > '0') {
if ($vars['view'] == 'details') {
// if we have a script for this check, use it.
$check_ds = null;
$check_script = $config['install_dir'] . '/includes/services/check_' . strtolower($service['service_type']) . '.inc.php';
if (is_file($check_script)) {
include $check_script;