WordPress-Coding-Standards
WordPress-Coding-Standards copied to clipboard
WordPress.Security.ValidatedSanitizedInput.MissingUnslash does not accept stripslashes()
This is weird, but WordPress.Security.ValidatedSanitizedInput.MissingUnslash sniff accepts only stripslashes_deep (type-ignorant) or stripslashes_from_strings_only
(type-ignorant) and does not accept the plain type-strict stripslashes
.
Because stripslashes isn't enough since it doesn't act recursively I guess? (e.g. if the type is an array)
but what if the type is not an array?
phpcs is not static analysis, so it wouldn't know.