MyBB Community Forums

Full Version: [F] Error in xmlhttp.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the file xmlhttp.php you can find this code:
while($buddy = $db->fetch_array($query))
    $buddy_name = format_name($buddy['username'], $buddy['usergroup'], $buddy['displaygroup']);
    $profile_link = build_profile_link($buddy_name, $buddy['uid'], '_blank');
    if($buddy['lastactive'] > $timecut && ($buddy['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $buddy['lastvisit'] != $buddy['lastactive'])
        eval("\$online[] = \"".$templates->get("xmlhttp_buddyselect_online")."\";");
        eval("\$offline[] = \"".$templates->get("xmlhttp_buddyselect_offline")."\";");
$online = implode("", $online);
$offline = implode("", $offline);
If the array $online or $offline is empty you get an error:
<message>implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed</message>
There should be a check if the arrays contain elements.
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.