-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.8
-
MOODLE_28_STABLE
When someone uploads a file which is greater than the max upload limit set in php.ini, the user is shown a message saying "A required parameter(sesskey) was missing" instead of the actual factor.
I noticed this error, while trying to restore a backup.
The code responsible for the correct message is (repository_ajax.php)
// If uploaded file is larger than post_max_size (php.ini) setting, $_POST content will be empty.
|
if (empty($_POST) && !empty($action)) {
|
$err->error = get_string('errorpostmaxsize', 'repository');
|
die(json_encode($err));
|
}
|
Seems it is expecting $_GET['action'] to be set, which is not in this case.
I have not tested in other places to be sure if the problem is localized to the restore page or not.