Skip to content

Replace deprecated get_request_var_post() with get_nfilter_request_var() - #43

Merged
somethingwithproof merged 1 commit into
developfrom
fix/replace-deprecated-get-request-var
Oct 24, 2026
Merged

somethingwithproof merged 1 commit into
developfrom
fix/replace-deprecated-get-request-var

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Summary

get_request_var_post() is a deprecated (v1.0) alias of get_nfilter_request_var() in Cacti core (lib/html_utility.php) — note it is an alias of the non-filtered accessor, not get_request_var(). This PR replaces the remaining call site with the canonical function so behavior is preserved exactly.

Change

  • get_request_var_post(...) -> get_nfilter_request_var(...)

Why not get_request_var()?

get_request_var() returns the filtered/validated value, logs a "not first been filtered" warning when log_validation is on, and writes back via set_request_var(). get_nfilter_request_var() is the true behavioral equivalent of the deprecated get_request_var_post() alias.

Validation

  • php -l passes on changed file(s).
  • No remaining deprecated call sites after the change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 22:39
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The single-line alias replacement preserves validation and behavior, with no unresolved findings.

No open issues 🎉

What changed in this PR

Replaces a deprecated Cacti request accessor with its canonical equivalent in WMI query action handling, preserving existing behavior.

Changes:

  • Replaces get_request_var_post('drp_action') with get_nfilter_request_var('drp_action').
  • Leaves numeric input validation unchanged.
File Description
wmi_queries.php Uses the canonical non-filtered request accessor in actions_queries().

Review effort: Balanced

@somethingwithproof
somethingwithproof merged commit 7fe6d33 into develop Oct 24, 2026
6 checks passed
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.

4 participants