Index: editcomment.php =================================================================== --- editcomment.php (revision 1594) +++ editcomment.php (working copy) @@ -189,7 +189,15 @@ } $comment['posttime'] = $datef->format($bugsys->options['dateformat'], $comment['dateline']); - $comment['postby'] = construct_user_display($commentapi->relations['userid']->objdata); + if ($comment['userid']) + { + $commenter = new UserAPI($bugsys); + $commenter->set('userid', $comment['userid']); + $commenter->set_condition(); + $commenter->fetch(); + $commenter = $commenter->objdata; + } + $comment['postby'] = construct_user_display($commenter); $comment['comment'] = $bugsys->sanitize($comment['comment']); $show['hide'] = ($bug['initialreport'] != $comment['commentid'] ? true : false); eval('$template->flush("' . $template->fetch('editcomment') . '");'); Index: includes/api_comment.php =================================================================== --- includes/api_comment.php (revision 1594) +++ includes/api_comment.php (working copy) @@ -40,7 +40,7 @@ var $fields = array( 'commentid' => array(TYPE_UINT, REQ_AUTO, 'verify_nozero'), 'bugid' => array(TYPE_UINT, REQ_YES, 'verify_nozero'), - 'userid' => array(TYPE_UINT, REQ_NO, null, array('includes/api_user.php', 'UserAPI')), + 'userid' => array(TYPE_UINT, REQ_NO), 'dateline' => array(TYPE_UINT, REQ_SET), 'parselinks' => array(TYPE_BOOL, REQ_NO), 'comment' => array(TYPE_STR, REQ_YES, 'verify_noempty'),