To reproduce:
<?php
|
|
// Put this script into the $CFG->dirroot of your Moodle and visit it from the
|
// browser.
|
|
require(__DIR__.'/config.php');
|
require_login();
|
|
if (!empty($_REQUEST)) {
|
header('Content-type: text/plain');
|
var_dump($_REQUEST);
|
die();
|
}
|
|
echo('<html><body>');
|
echo('<form action="" method="post">');
|
echo PHP_EOL;
|
for ($i = 0; $i < 1100; $i++) {
|
echo('<input type="hidden" name="foo[]" value="'.$i.'" />');
|
echo PHP_EOL;
|
}
|
echo('<button type="submit">Submit</button>');
|
echo('</body></html>');
|
Assuming you have max_input_vars set to the default 1000, you should see that the $_REQUEST now contains invalid values and some vars are duplicated.