If it helps, this is where it fails.
Find
// !!! Separate the sprintf?
if (empty($regOptions['email']) || preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', $regOptions['email']) === 0 || strlen($regOptions['email']) > 255)
$reg_errors[] = array('done', sprintf($txt['valid_email_needed'], $smcFunc['htmlspecialchars']($regOptions['username'])));
Code: (Replace)
// Lets restrict some email providers
if (!empty($modSettings['restricted_provider']))
{
$restricted_provider = explode(",", preg_replace("/(\@[^a-zA-Z0-9,])/", "", $modSettings['restricted_provider']));
foreach ($restricted_provider as $key => $value)
if (empty($value))
unset($restricted_provider[$key]);
}
else
$restricted_provider = array();
if (!empty($modSettings['enable_restrict_EmailProvider']) && !empty($modSettings['restricted_provider']))
{
foreach($restricted_provider as $provider)
{
preg_match('/' . $provider . '+/i', $_POST['email'], $matches);
if(count($matches) > 0)
fatal_error(sprintf($txt['restricted'], $regOptions['username']), false);
}
}
if (!empty($modSettings['accepted_provider']))
{
$accepted_provider = explode(",", preg_replace("/(\@[^a-zA-Z0-9,])/", "", $modSettings['accepted_provider']));
foreach ($accepted_provider as $akey => $avalue)
if (empty($avalue))
unset($accepted_provider[$akey]);
}
else
$accepted_provider = array();
if (!empty($modSettings['enable_restrict_EmailProvider']) && !empty($modSettings['accepted_provider']))
{
foreach($accepted_provider as $aprovider)
{
preg_match('/' . $aprovider . '+/i', $_POST['email'], $matches);
if(count($accepted_provider) == 1)
{
if(count($matches) == 0)
fatal_error(sprintf($txt['restricted'], $regOptions['username']), false);
}
else
{
if(count($matches) == 0 && !(each($accepted_provider)))
fatal_error(sprintf($txt['restricted'], $regOptions['username']), false);
}
}
}
// !!! Separate the sprintf?
elseif (empty($regOptions['email']) || preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', $regOptions['email']) === 0 || strlen($regOptions['email']) > 255)
$reg_errors[] = array('done', sprintf($txt['valid_email_needed'], $smcFunc['htmlspecialchars']($regOptions['username'])));