Skip to content

Bug: Type 2 warning realert window uses wrong config field (time_warning_fail_length instead of repeat_alert) #745

@somethingwithproof

Description

@somethingwithproof

Summary

In thold_functions.php (line ~3289), the type 2 warning re-alert window is computed from the wrong field:

// Alert path (correct):
$realerttime = ($thold_data['repeat_alert'] - 1) * $step;

// Warning path (wrong field):
$realerttime = ($thold_data['time_warning_fail_length'] - 1) * $step;

The warning realert window uses time_warning_fail_length (the warning time window length) instead of repeat_alert (the configured re-alert interval). The $ra guard check also uses time_warning_fail_length as its truthy test.

Impact

Warning re-alerts fire at a completely wrong cadence, controlled by the wrong setting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions