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

Lack of interest [minor] Use array_unique() in XenForo_Model_Import::getImportContentMap()

Mike Tougeron

Well-known member
#1
When importing extremely large datasets, the query created in XenForo_Model_Import::getImportContentMap() can get very large and run out of memory. This method doesn't check to see if the $ids is an array with only unique values so the IN statement could include 1000s of values when only a few 100 are needed.

Line 311
$ids = array_unique($ids);

I know this is a minor thing and won't happen that often for most people but I thought I'd throw it out there since it caused me some minor headaches. :)

Thanks, Mike