Fixed Usernames not showing the letter "V" in them?

darren

Member
I've disabled addons in the config.php so I can't see it being an addon issue.

A user just made an account with the letter "V" in and it just replaced it with a space so "glove" would be "glo e" for example.

Any help would be greatly appreciate, "V" is not in the named letters from usernames btw.
 
Do you think you could submit a ticket via the customer area with FTP and ACP details?

It looks like your PCRE doesn't have \v (vertical white space). This is the first time I've seen this though.
 
This is related to a 5+ years old PCRE install. You should probably contact your host about it. In general, it's preferable for PHP to be compiled with the built-in PCRE library (rather than the server version).
 
The fix is to replace this code in library/XenForo/DataWriter/User.php:
Code:
$newName = preg_replace('/\v+/u', ' ', $username);
if (is_string($newName))
{
        $username = $newName;
}

With:
Code:
// if this matches, then \v isn't known (appears to be PCRE < 7.2) so don't strip
if (!preg_match('/\v/', 'v'))
{
        $newName = preg_replace('/\v+/u', ' ', $username);
        if (is_string($newName))
        {
                $username = $newName;
        }
}
 
Top Bottom