Skip to content

Commit

Permalink
Merge pull request #40 from sitegeist/task/renderRemotePortsCorrectly
Browse files Browse the repository at this point in the history
BUGFIX: Render port number in mysql command as string
  • Loading branch information
mficzel authored Apr 14, 2020
2 parents 62b4c97 + 417c860 commit ac541a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/DBAL/SimpleDBAL.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function buildCmd(string $driver, ?string $host, int $port, string $usern
public function buildDumpCmd(string $driver, ?string $host, int $port, string $username, string $password, string $database): string
{
if ($driver === 'pdo_mysql') {
return sprintf('mysqldump --single-transaction --add-drop-table --host=%s --port=%d --user=%s --password=%s %s', escapeshellarg($host), escapeshellarg($port), escapeshellarg($username), escapeshellarg($password), escapeshellarg($database));
return sprintf('mysqldump --single-transaction --add-drop-table --host=%s --port=%s --user=%s --password=%s %s', escapeshellarg($host), escapeshellarg($port), escapeshellarg($username), escapeshellarg($password), escapeshellarg($database));
} else if ($driver === 'pdo_pgsql') {
return sprintf('PGPASSWORD=%s pg_dump --host=%s --port=%s --username=%s --dbname=%s --schema=public --no-owner --no-privileges', escapeshellarg($password), escapeshellarg($host), escapeshellarg($port), escapeshellarg($username), escapeshellarg($database));
}
Expand Down

0 comments on commit ac541a1

Please sign in to comment.