Fixed `requireEmailChoice` error

Tom

Active member
Affected version
2.0.6 Beta 1
Getting these showing up in the server error logs:
ErrorException: [E_NOTICE] Undefined index: requireEmailChoice src/XF/Pub/Controller/Register.php:410

Code:
#0 src/XF/Pub/Controller/Register.php(410): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/fellowsfi...', 410, Array)
#1 src/XF/Pub/Controller/Register.php(384): XF\Pub\Controller\Register->getRegistrationInput(Object(XF\Service\User\RegisterForm))
#2 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Register->actionRegister(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'Register', 'json', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\Register), NULL)
#4 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#6 src/XF.php(328): XF\App->run()
#7 index.php(13): XF::runApp('XF\\Pub\\App')
#8 {main}
 
We spotted this and fixed it earlier.

For now, just go into Options > User registration and hit save, and that should sort it.
 
Ah okay, cheers. Just out of curiosity, how did this actually affect users? Just that this seems to have been flagged up by a good few different users trying to register.
 
Best case scenario, their registration completed but that option evaluated to false (no big deal, as it wouldn't have displayed the option on the registration form anyway).

Worst case scenario, their registration wouldn't have gone through at all. Which would be unfortunate, but that's why we don't recommend using beta versions in production ;)
 
that's why we don't recommend using beta versions in production ;)
Yeah, we’re aware of the risks, but I wouldn’t imagine there are any major changes that could cause absolutely major issues. No worries anyway, as the registrations appear to have gone through fine 😀.
 
Top Bottom