mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
Fix for bug MDL-8708 "Debug, multiple warnings in admin/uploaduser.php and user.php"
This commit is contained in:
parent
dbcf4d014b
commit
34d4b268c7
@ -131,10 +131,10 @@ if ($um->preprocess_files() && confirm_sesskey()) {
|
||||
// check for valid field names
|
||||
foreach ($header as $i => $h) {
|
||||
$h = trim($h); $header[$i] = $h; // remove whitespace
|
||||
if (!($required[$h] or $optionalDefaults[$h] or $optional[$h])) {
|
||||
if (!(isset($required[$h]) or isset($optionalDefaults[$h]) or isset($optional[$h]))) {
|
||||
error(get_string('invalidfieldname', 'error', $h), 'uploaduser.php?sesskey='.$USER->sesskey);
|
||||
}
|
||||
if ($required[$h]) {
|
||||
if (isset($required[$h])) {
|
||||
$required[$h] = 0;
|
||||
}
|
||||
}
|
||||
@ -173,7 +173,7 @@ if ($um->preprocess_files() && confirm_sesskey()) {
|
||||
// add fields to object $user
|
||||
foreach ($record as $name => $value) {
|
||||
// check for required values
|
||||
if ($required[$name] and !$value) {
|
||||
if (isset($required[$name]) and !$value) {
|
||||
error(get_string('missingfield', 'error', $name). " ".
|
||||
get_string('erroronline', 'error', $linenum) .". ".
|
||||
get_string('processingstops', 'error'),
|
||||
|
@ -355,7 +355,9 @@
|
||||
. get_string($changeaccessto, 'mnet') . " access</a>)";
|
||||
}
|
||||
// mnet info in edit column
|
||||
$editbutton = $mnethosts[$user->mnethostid]->name;
|
||||
if (isset($mnethosts[$user->mnethostid])) {
|
||||
$editbutton = $mnethosts[$user->mnethostid]->name;
|
||||
}
|
||||
}
|
||||
|
||||
if ($user->lastaccess) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user