Skip to content

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

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.

Fix

Implementation in #805.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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