Skip to content

Conversation

@rodrigoprimo
Copy link
Collaborator

Description

The error message for InputNotValidated previously listed specific methods (isset() and empty()), but the list was incomplete. Rather than expanding it, this PR adopts a more generic message that won't require updates when new validation methods are added.

@jrfnl, I made a small modification to the phrase that you suggested by adding "that" after "check". This way the sentences reads a bit better to me, but let me know if you disagree.

Detected usage of a possibly undefined superglobal array index: %s. Check that the array index exists before using it.

Suggested changelog entry

Changed:

WordPress.Security.ValidatedSanitizedInput: the InputNotValidated error message is now more generic.

Related issues/external references

Discussed in #2641

…essage

The error message for `InputNotValidated` previously listed specific methods (isset() and empty()), but the list was incomplete. Rather than expanding it, this commit adopts a more generic message that won't require updates when new validation methods are added.

Fixes 2641

Co-authored-by: Juliette <[email protected]>
Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

LGTM

@jrfnl jrfnl added this to the 3.3.0 milestone Nov 6, 2025
@dingo-d dingo-d merged commit 882af07 into WordPress:develop Nov 7, 2025
29 checks passed
@rodrigoprimo rodrigoprimo deleted the update-validated-sanitized-error-message branch November 11, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants