Merge pull request #1642 from SevanNerse/fix-install-command

Fixing console command for the installation of Akaunting
This commit is contained in:
Denis Duliçi 2020-10-16 15:03:23 +03:00 committed by GitHub
commit 332f2cc1d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ class Install extends Command
{ {
$missing_options = []; $missing_options = [];
$contants = [ $constants = [
'OPT_LOCALE', 'OPT_LOCALE',
'OPT_DB_PORT', 'OPT_DB_PORT',
'OPT_DB_HOST', 'OPT_DB_HOST',
@ -113,7 +113,7 @@ class Install extends Command
$allowed_empty = ['db_password', 'db_prefix']; $allowed_empty = ['db_password', 'db_prefix'];
foreach ($contants as $const) { foreach ($constants as $const) {
$option = constant("self::$const"); $option = constant("self::$const");
$property = str_replace('-', '_', $option); $property = str_replace('-', '_', $option);
@ -155,7 +155,7 @@ class Install extends Command
$this->db_username = $this->ask('What is the database username?', 'root'); $this->db_username = $this->ask('What is the database username?', 'root');
} }
if (empty($this->db_password)) { if (!isset($this->db_password)) {
$this->db_password = $this->secret('What is the database password?', ''); $this->db_password = $this->secret('What is the database password?', '');
} }