Olá
Quando tentei atualizar o moodle para a versão 3.0.2 e ao efetuar a troca das pastas apareceu a seguinte mensagem \:
Fatal error: Cannot redeclare message_current_user_is_involved()
(previously declared in
/home/conas978/public_html/lms.strongsecurity.com.br/lib/deprecatedlib.php:2121)
in /home/conas978/public_html/lms.strongsecurity.com.br/message/lib.php on line 2548
Ao verificar o arquivo em questão não consegui entender o erro.
onde a linha 2121 seria o else destacado no código abaixo em negrito
//using string manager directly so that strings in the message will be in the message recipients language rather than the senders
$eventdata->subject = get_string_manager()->get_string('unreadnewmessage', 'message', fullname($userfrom), $userto->lang);
if ($format == FORMAT_HTML) {
$eventdata->fullmessagehtml = $message;
//some message processors may revert to sending plain text even if html is supplied
//so we keep both plain and html versions if we're intending to send html
$eventdata->fullmessage = html_to_text($eventdata->fullmessagehtml);
} else {
$eventdata->fullmessage = $message;
$eventdata->fullmessagehtml = '';
}
$eventdata->fullmessageformat = $format;
$eventdata->smallmessage = $message;//store the message unfiltered. Clean up on output.
$s = new stdClass();
$s->sitename = format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID)));
$s->url = $CFG->wwwroot.'/message/index.php?user='.$userto->id.'&id='.$userfrom->id;
$emailtagline = get_string_manager()->get_string('emailtagline', 'message', $s, $userto->lang);
if (!empty($eventdata->fullmessage)) {
$eventdata->fullmessage .= "\n\n---------------------------------------------------------------------\n".$emailtagline;
}
if (!empty($eventdata->fullmessagehtml)) {
$eventdata->fullmessagehtml .= "<br /><br />---------------------------------------------------------------------<br />".$emailtagline;
}
$eventdata->timecreated = time();
E a linha 2548 seria a chave fechada
/**
* Is $USER one of the supplied users?
*
* $user2 will be null if viewing a user's recent conversations
*
* @param stdClass the first user
* @param stdClass the second user or null
* @return bool True if the current user is one of either $user1 or $user2
*/
function message_current_user_is_involved($user1, $user2) {
global $USER;
if (empty($user1->id) || (!empty($user2) && empty($user2->id))) {
throw new coding_exception('Invalid user object detected. Missing id.');
}
if ($user1->id != $USER->id && (empty($user2) || $user2->id != $USER->id)) {
return false;
}
return true;
}
Poderiam me auxiliar pois ao tentar acessar o moodle ele fica em branco e aparece somente essa mensagem.