From d7f715cc36626dce2b3ebdce49744b6b97edfd4d Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Thu, 27 Apr 2023 13:35:34 +0200 Subject: [PATCH] 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. --- htdocs/install/inc.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index c0bded73cd2..dcd2462b14f 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -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