It's nothing to do with sending the mail, they just happen to be creating a mailing here, it's about generating a select box, specifically containing usergroups.
./admin/modules/user/mass_mail.php:948:
$form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5))
Also the errors from
this thread... ./admin/modules/user/users.php:532:
$form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup'))
./admin/modules/user/users.php:533:
$form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5))
What's it's complaining about in all 3 errors is line 359 of ./admin/inc/class_form.php:
foreach($option_list as $value => $option)
$option_list is the second parameter in the three pieces of code above. The code that generates $options in these three code blocks is as follows:
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{
$options[$usergroup['gid']] = $usergroup['title'];
}
If $options is apparently an invalid argument, it's not an array, and the only time it wouldn't be an array is if it didn't loop through the while loop, but it only wouldn't loop through if the query returned no results. The main usergroups list queries the usergroups table too, as opposed to reading fromt he cache, but if that's fine, I can't see why the query is failing in these locations.
Try this... line 943 of ./admin/modules/user/mass_mail.php and line 526 of ./admin/modules/user/users.php:
while($usergroup = $db->fetch_array($query))
change to:
$options = array();
while($usergroup = $db->fetch_array($query))
This will get rid of the error, but is there actually anything in the list of usergroups that's being generated here?? I.e. when making the mail and creating a new user there'll be a select box with usergroups, what's in them after making this change??