My friend tried to edit the /modules/comment/comment.module file, and now I get a syntax error.

Can anyone tell me what`s wrong? I can`t seem to spot it. D;

The error I am receiving is Parse error: syntax error, unexpected '}' in /home/artistsf/public_html/_____/modules/comment/comment.module on line 282, though sometimes the line number changes to 284.

The following is a copy of the part where it was edited, and I don`t know what it is supposed to look like otherwise. \:

/**
* Returns a formatted list of recent comments to be displayed in the comment
* block.
*
* @ingroup themeable
*/
function theme_comment_block() {
  $items = array();
  foreach (comment_get_recent() as $comment) {
    $items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .
  }
  if ($items) {
    return theme('item_list', $items);
  }
}

Sorry if this is in the wrong area -- I can`t figure out for the life of me where to put anything on this site. o;

Comments

heine’s picture

$items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .

Should be

$items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid);

Instead of changing comment module, override the theme function in your theme (phptemplate_comment_block in a phptemplate theme). See the theming handbook for more information.
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.

removed11111’s picture

Truly, thank you so very much! ^^