Fixed Error while importing polls in IPBoard.php from IPB 3.1

Zeras

Active member
While converting an IPB 3.1 site using 1.2 beta 5, I received this error while importing polls:
Code:
ErrorException: reset() expects parameter 1 to be array, boolean given - library/XenForo/Importer/IPBoard.php:2915

This was a test conversion run and I was able to get around it by adding an is_array check to IPBoard.php right above that line to 'continue' if the parameter is not an array. It had converted several polls before it encountered the error so it is quite likely there was a problem with the source data.

This is not something I need fixed since my work-around let the import continue. The only reason I posted this is because I did not receive the error when I ran the test conversion with 1.1.5.

-Zeras
 
It almost looks like the unserialize failed, though it didn't trigger the exception. I've added a similar check to prevent this now.
 
Top Bottom