I noticed this foreach loop did not check to make sure there was a value being passed to it:

foreach ($wordpress_import->newuser as $key => $value) {
  $user = array('mail' => $value['mail'], 'pass' => user_password(), 'name' => $value['name'], 'status' => 1);
  $user = user_save('', $user);
  $wordpress_import->usermap[$key] = $user->uid;
  $context['results']['created_users']++;
}

Attached is a fix.

CommentFileSizeAuthor
wordpress_import-foreach.patch1.37 KBkmonty

Comments

kmonty’s picture

Status: Active » Needs review
lavamind’s picture

Thank you for this patch, and other bug reports you submitted.

I will review them as soon as possible and commit the required fixes.

lavamind’s picture

Assigned: Unassigned » lavamind
Status: Needs review » Fixed

Fixed in 6.x-2.x-dev

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.