From 7496fbb66e3a43d051c57f3531b1b2b055b66b6b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 18 Aug 2019 12:51:41 +0200 Subject: [PATCH] remove quotes from arguments eg. 'db_host=db', in case it does not happen by shell (eg. debuging in Netbeans) --- setup/setup-cli.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup/setup-cli.php b/setup/setup-cli.php index 03ca11a97a..468080fdeb 100755 --- a/setup/setup-cli.php +++ b/setup/setup-cli.php @@ -131,6 +131,11 @@ switch($action) list($args['domain']) = explode(',', array_shift($arguments)); // domain must be first argument, to ensure right domain get's selected in header-include foreach($arguments as $arg) { + // remove quotes from arguments eg. 'db_host=db', in case it does not happen by shell (eg. debuging in Netbeans) + if (in_array($arg[0], ["'", '"']) && substr($arg, -1) === $arg[0]) + { + $arg = substr($arg, 1, -1); + } list($name,$value) = explode('=',$arg,2); if(property_exists('admin_cmd',$name)) // dont allow to overwrite admin_cmd properties {