Fix: install/inc: remove optional argument check

htdocs/install/step2.php has two optional argv parameters: action and
selectlang.

It doesn't have any version indicator, and thus doesn't have any
constraint on the number of parameters, so remove it from inc.php.

The constraint can still be re-included in the other files including
inc.php, as well as the other script-specific options.
This commit is contained in:
Alexandre Janniaux 2023-04-27 13:35:34 +02:00
parent 57cbb21f6b
commit d7f715cc36

View File

@ -143,13 +143,6 @@ if (php_sapi_name() === "cli") {
exit(1);
}
// Currently, scripts using inc.php will require addtional arguments,
// see help above for more details.
if ($rest_index > $argc - 2) {
usage($argv[0], "Missing mandatory arguments, usage:");
exit(1);
}
// Tricky argument list hack, should be removed someday.
// Reset argv to remove the argument that were parsed. This is needed
// currently because some install code, like in upgrade.php, are using