Unset redis password if empty.

This commit is contained in:
Dane Everitt 2017-11-04 16:40:48 -05:00
parent 69cd330eb8
commit bda42b673f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -147,11 +147,15 @@ class AppSettingsCommand extends Command
$this->output->comment(trans('command/messages.environment.app.redis_pass_help'));
$this->variables['REDIS_PASSWORD'] = $this->option('redis-pass') ?? $this->output->askHidden(
trans('command/messages.environment.app.redis_password'), function () {
return true;
return '';
}
);
}
if (empty($this->variables['REDIS_PASSWORD'])) {
unset($this->variables['REDIS_PASSWORD']);
}
$this->variables['REDIS_PORT'] = $this->option('redis-port') ?? $this->ask(
trans('command/messages.environment.app.redis_port'), $this->config->get('database.redis.default.port')
);