Summary
In thold_functions.php, the type 2 (time-based) normal restoral logic in thold_check_threshold() (lines ~3443 and ~3512) used < instead of >= for the fail count comparisons:
// Warning restoral (inverted):
if ($alertstat != 0 && $warning_failures < $warning_trigger && $thold_data['restored_alert'] != 'on') {
// Alert restoral (inverted):
} elseif ($alertstat != 0 && $failures < $trigger && $thold_data['restored_alert'] != 'on') {
Impact
The < vs >= inversion caused:
- Restorals to fire for thresholds that were never triggered — when the fail count was below the trigger (no alert was ever sent), a restoral notification was incorrectly generated.
- Restorals to be silently suppressed for thresholds that were triggered — when the fail count reached or exceeded the trigger (an alert was sent), the restoral was incorrectly blocked.
Fix
Implementation in #796.
Summary
In
thold_functions.php, the type 2 (time-based) normal restoral logic inthold_check_threshold()(lines ~3443 and ~3512) used<instead of>=for the fail count comparisons:Impact
The
<vs>=inversion caused:Fix
Implementation in #796.