diff --git a/user/extendenrol.php b/user/extendenrol.php index 9064ff58f4d..56e9d400d43 100644 --- a/user/extendenrol.php +++ b/user/extendenrol.php @@ -1,8 +1,8 @@ -id)) { error("You must be an editing teacher in this course, or an admin"); } -if ($users && ($form = data_submitted() and confirm_sesskey())) { +if ((count($users) > 0) and ($form = data_submitted()) and confirm_sesskey()) { if (count($form->userid) != count($form->extendperiod)) { error('Parameters malformation', $CFG->wwwroot.'/user/index.php?id='.$id); }