• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Error when sending welcome conversation

Affected version
2.0.0 Beta 1

Liam W

Well-known member
#1
I got this error when someone registered:

Code:
ErrorException: preg_split() expects parameter 2 to be string, array given src/XF/Service/User/Welcome.php:108
Stack trace:

Code:
#0 [internal function]: XF::handlePhpError(2, 'preg_split() ex...', '/home/nginx/dom...', 108, Array)
#1 /home/nginx/domains/lw-addons.net/public/src/XF/Service/User/Welcome.php(108): preg_split('#\\s*,\\s*#', Array, -1, 1)
#2 /home/nginx/domains/lw-addons.net/public/src/XF/Service/User/Welcome.php(58): XF\Service\User\Welcome->sendMessage()
#3 /home/nginx/domains/lw-addons.net/public/src/XF/Service/User/EmailConfirmation.php(57): XF\Service\User\Welcome->send()
#4 /home/nginx/domains/lw-addons.net/public/src/XF/Pub/Controller/AccountConfirmation.php(29): XF\Service\User\EmailConfirmation->emailConfirmed()
#5 /home/nginx/domains/lw-addons.net/public/src/XF/Mvc/Dispatcher.php(232): XF\Pub\Controller\AccountConfirmation->actionEmail(Object(XF\Mvc\ParameterBag))
#6 /home/nginx/domains/lw-addons.net/public/src/XF/Mvc/Dispatcher.php(85): XF\Mvc\Dispatcher->dispatchClass('XF:AccountConfi...', 'Email', 'html', Object(XF\Mvc\ParameterBag), '')
#7 /home/nginx/domains/lw-addons.net/public/src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 /home/nginx/domains/lw-addons.net/public/src/XF/App.php(1771): XF\Mvc\Dispatcher->run()
#9 /home/nginx/domains/lw-addons.net/public/src/XF.php(319): XF\App->run()
#10 /home/nginx/domains/lw-addons.net/public/index.php(13): XF::runApp('XF\\Pub\\App')
#11 {main}
Liam
 

Chris D

XenForo developer
Staff member
#2
I was confused by this one for a few moments then I remembered some changes we made to this system. While confirming it, the fix was easy enough so that's done already.

It's a bit more than a one line change so I'd recommend just disabling the welcome message until Beta 2.