Summary
In thold_functions.php (lines 2269-2270), the SNMP warning and normal trap flags use != instead of ==:
$thold_snmp_warning_traps = (read_config_option('thold_alert_snmp_warning') != 'on');
$thold_snmp_normal_traps = (read_config_option('thold_alert_snmp_normal') != 'on');
!= 'on' means both flags are true when the option is disabled and false when enabled. Every if ($thold_snmp_traps && $thold_snmp_warning_traps) gate fires when the admin turned warnings off, and does not fire when they turned it on.
The main alert flag $thold_snmp_traps uses == 'on' correctly. This is a copy-paste inversion.
Fix
Change != to == for both lines.
Impact
All three threshold type branches. Every installation using SNMP traps for warning/normal events.
Summary
In
thold_functions.php(lines 2269-2270), the SNMP warning and normal trap flags use!=instead of==:!= 'on'means both flags aretruewhen the option is disabled andfalsewhen enabled. Everyif ($thold_snmp_traps && $thold_snmp_warning_traps)gate fires when the admin turned warnings off, and does not fire when they turned it on.The main alert flag
$thold_snmp_trapsuses== 'on'correctly. This is a copy-paste inversion.Fix
Change
!=to==for both lines.Impact
All three threshold type branches. Every installation using SNMP traps for warning/normal events.