I've been trying to install a forum coded by someone else, and I found an "Unexpected T_VARIABLE" error. I have narrowed the possible causes of the error down to this section, as the error disappears if this section is ignored.
/* Attachments */
/* if (isset($FILES['upload']['name']) $FILES['upload']['size'] > 0 &&
$DATA['user']['user_level'] >= $CONF['abilities']['attachment']) {
if ($_FILES['upload']['size'] >
$_CONF['general']['attach_limit'])
$page->error('other', 'The attachment exceeded
the upload limit!');
$update_cmds = array(
'message_aname' => $FILES['upload']['name'],
'message_amime' => $FILES['upload']['type'],
'message_asize' => $_FILES['upload']['size']
);
if(!move_uploaded_file($_FILES['upload']['tmp_name'],
'attachments/'.$msgid))
$page->error('other', 'An unknown error occured
while uploading the attachment.');
$SQL->update('messages', $update_cmds, '`message_id` =
'.$msgid);
} */
I am totally unfamiliar with this type of coding, can anyone tell me what's wrong there? That first isset() function looks like one of the messiest I've ever seen...