From 7564e419932ef494394befe316800208435661ff Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Fri, 22 Mar 2024 11:59:34 +0100 Subject: [PATCH] Fix a warning. --- pandora_server/lib/PandoraFMS/Core.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 2fe0572a3a..4bd7da32d0 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -2485,8 +2485,10 @@ sub pandora_process_module ($$$$$$$$$;$) { } # Generate alerts + my $inhibit_service_alerts = enterprise_hook('pandora_inhibit_service_alerts', [$pa_config, $module, $dbh, 0]); + $inhibit_service_alerts = 0 unless defined($inhibit_service_alerts); if (pandora_inhibit_alerts ($pa_config, $agent, $dbh, 0) == 0 && - (pandora_cps_enabled($agent, $module) == 0 || enterprise_hook('pandora_inhibit_service_alerts', [$pa_config, $module, $dbh, 0]) == 0)) + (pandora_cps_enabled($agent, $module) == 0 || $inhibit_service_alerts == 0)) { pandora_generate_alerts ($pa_config, $processed_data, $status, $agent, $module, $utimestamp, $dbh, $timestamp, $extra_macros, $last_data_value); }