Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behavior of --dbpassword to allow for empty passwords #115

Merged
merged 1 commit into from
Jan 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions lib/DBSteward/dbsteward.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,14 @@ public function arg_parse() {
&& strlen($options["dbuser"]) > 0) {
$dbuser = $options["dbuser"];
}
if (isset($options['dbpassword'])
&& strlen($options['dbpassword']) > 0) {
$this->cli_dbpassword = $options['dbpassword'];
if (isset($options['dbpassword'])) {
if ($options['dbpassword'] === false) {
// treat --dbpassword as the empty password, because
// --dbpassword='' doesn't show up in $options
$this->cli_dbpassword = '';
} else {
$this->cli_dbpassword = $options['dbpassword'];
}
}

///// SQL DDL DML DCL output flags
Expand Down