two-factor icon indicating copy to clipboard operation
two-factor copied to clipboard

PHP 8.1 compatibility: replace FILTER_SANITIZE_STRING

Open sjinks opened this issue 2 years ago • 1 comments

PHP 8.1 deprecated FILTER_SANITIZE_STRING. This PR replaces it with other alternatives.

Ref: Automattic/vip-go-mu-plugins#2667

sjinks avatar Jan 24 '22 16:01 sjinks

Per yesterday's bug scrub, @georgestephanis feels the sanitize string is reasonable and could be good to merge, but is not familiar with filter_callback and not positive if core code style still recommends using array( ) over [ ] shorthand.

jeffpaul avatar Mar 24 '22 18:03 jeffpaul

This looks good! I'll merge this in and some linter checks to find any other PHP8 compatibility issues.

kasparsd avatar Oct 07 '22 09:10 kasparsd

WPCS still requires longhand array syntax, so that's the code suggestions I've made here.

There was a proposal to change to the short syntax, but the decision was to keep the long one.

iandunn avatar Oct 14 '22 17:10 iandunn