killtro
Member
We are finishing our conversion to Xenforo from IPB3.3 (Yippie-Kai-Yay!)
We are using Jake Bounce's patch from here: http://xenforo.com/community/threads/conversion-from-ip-board.33832/
All fine, until polls get converted.
We hit this error:
http://i.imm.io/U2tp.png
So I went to Abstract.php line 157, and wrapped the whole if (preg_match('/[\x80-\xff]/', $string)) conditional with if(!is_array($string)) { }
Like this:
After that, the importing keeps going without errors.
Hope this helps someone else.
We are using Jake Bounce's patch from here: http://xenforo.com/community/threads/conversion-from-ip-board.33832/
All fine, until polls get converted.
We hit this error:
http://i.imm.io/U2tp.png
PHP:
Server Error
preg_match() expects parameter 2 to be string, array given
XenForo_Application::handlePhpError()
preg_match() in XenForo/Importer/Abstract.php at line 157
XenForo_Importer_Abstract->_convertToUtf8()
array_map() in XenForo/Importer/IPBoard.php at line 2937
XenForo_Importer_IPBoard->stepPolls() in XenForo/Importer/Abstract.php at line 77
XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 180
XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 132
XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /mnt/data/websites/antronioforo/html/admin.php at line 13
So I went to Abstract.php line 157, and wrapped the whole if (preg_match('/[\x80-\xff]/', $string)) conditional with if(!is_array($string)) { }
Like this:
PHP:
if(!is_array($string)) {
if (preg_match('/[\x80-\xff]/', $string))
{
if (function_exists('iconv'))
{
$string = @iconv($this->_charset, 'utf-8//IGNORE', $string);
}
else if (function_exists('mb_convert_encoding'))
{
$string = mb_convert_encoding($string, 'utf-8', $this->_charset);
}
}
}
After that, the importing keeps going without errors.
Hope this helps someone else.