Skip to content

fix: correct host/program alert status placeholders#266

Open
somethingwithproof wants to merge 2 commits intoCacti:developfrom
somethingwithproof:bugfix/alert-sql-placeholder
Open

fix: correct host/program alert status placeholders#266
somethingwithproof wants to merge 2 commits intoCacti:developfrom
somethingwithproof:bugfix/alert-sql-placeholder

Conversation

@somethingwithproof
Copy link

@somethingwithproof somethingwithproof commented Mar 6, 2026

Summary

  • remove accidental uniqueID string concatenation from host/program alert SQL templates
  • keep status filtering parameterized and bound via prepared params
  • preserve existing alert matching behavior for other alert types
  • add regression coverage for host/program alert SQL generation
  • run regression scripts from CI when tests/regression/*.php exist
  • add changelog entry for issue bug: host and program alert types produce invalid SQL due to concatenated uniqueID #253

Validation

  • php -l functions.php
  • php -l tests/regression/issue253_alert_sql_placeholder_test.php
  • php tests/regression/issue253_alert_sql_placeholder_test.php

Fixes #253

Copilot AI review requested due to automatic review settings March 6, 2026 22:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes invalid SQL generated for host and program alert types in the Syslog plugin by removing an accidental $uniqueID string concatenation from prepared SQL templates, resolving Issue #253.

Changes:

  • Remove erroneous . $uniqueID concatenation from the host alert SQL template.
  • Remove erroneous . $uniqueID concatenation from the program alert SQL template.
  • Preserve parameter binding (status = ? with $uniqueID in $params) to keep prepared statements correct.

somethingwithproof and others added 2 commits March 7, 2026 05:32
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof somethingwithproof force-pushed the bugfix/alert-sql-placeholder branch from 08e7509 to 1137926 Compare March 7, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: host and program alert types produce invalid SQL due to concatenated uniqueID

2 participants