-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PluginCheck.CodeAnalysis.SettingSanitization.register_settingDynamic #871
Comments
I think the sniff is working as intended. It's a static check so it doesn't really know what the function is, hence it emits a warning telling you to ensure proper sanitization. See plugin-check/phpcs-sniffs/PluginCheck/Sniffs/CodeAnalysis/SettingSanitizationSniff.php Lines 89 to 100 in c334a5f
@ernilambar please correct me if I'm wrong |
I get it is a warning. Maybe I dont undersatnd the wording. "Please ensure proper sanitization" of what ? I'm not sure why the third param need sanitization in anycase? https://developer.wordpress.org/reference/functions/register_setting/ the warning happens in all combinations i looked at Maybe the warning has to be clearer? Otherwise it is just noise ( to me )
|
The third parameter of |
Warns about sanitization on callbacks using array( $this, 'cb_function') when $this should not be sanitized
The text was updated successfully, but these errors were encountered: