Merge pull request #5622 from shleeable/patch-16

FILTER_SANITIZE_STRING filter was deprecated in PHP 8.1.0. Use htmlspecialchars()
This commit is contained in:
daniel 2025-02-03 03:13:37 -07:00 committed by GitHub
commit 72150d4797
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,7 +90,7 @@ class FixUsernames extends Command
break;
case $opts[1]:
$new = filter_var($old, FILTER_SANITIZE_STRING|FILTER_FLAG_STRIP_LOW);
$new = htmlspecialchars($old, ENT_QUOTES, 'UTF-8');
if(strlen($new) < 6) {
$new = $new . '_' . str_random(4);
}