Open paulschreiber opened 5 years ago
You seem to be sanitizing with self::sanitize_promos_array()
, rather than the global sanitize_promos_array()
. I'm not sure if there is a way to define non-global sanitizing functions (methods). @jrfnl?
Yes, we are using a class method. This worked with WPCS 1.x.
Also with WPCS 1, putting self::sanitize_promos_array()
in the ruleset did not work.
@paulschreiber I'm not sure if my issue is related to this, I have the following error.
"Detected usage of a non-sanitized input variable" with $_POST['taxonomoy_ordering_data']
This is an array of numbers that are being sanitized using filter_var_array
filter_var_array( wp_unslash( $_POST['taxonomy_ordering_data'] ), FILTER_SANITIZE_NUMBER_INT )
Bug Description
When I run
vendor/bin/phpcs class-foo.php
, I get this error:I would expect the error to be suppressed because
sanitize_promos_array
is whitelisted.Minimal Code Snippet
phpcs.xml:
Environment
Additional Context (optional)