Skip to content

Commit

Permalink
BUGFIX: Support null as host-value
Browse files Browse the repository at this point in the history
  • Loading branch information
mficzel committed Nov 16, 2018
1 parent 7debca0 commit 2a3493e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Sitegeist/MagicWand/DBAL/SimpleDBAL.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SimpleDBAL {
* @param string $database
* @return string
*/
public function buildCmd(string $driver, string $host, int $port, string $username, string $password, string $database): string
public function buildCmd(string $driver, ?string $host, int $port, string $username, string $password, string $database): string
{
if ($driver === 'pdo_mysql') {
return sprintf('mysql --host=%s --port=%s --user=%s --password=%s %s', escapeshellarg($host), escapeshellarg($port), escapeshellarg($username), escapeshellarg($password), escapeshellarg($database));
Expand All @@ -37,7 +37,7 @@ public function buildCmd(string $driver, string $host, int $port, string $userna
* @param string $database
* @return string
*/
public function buildDumpCmd(string $driver, string $host, int $port, string $username, string $password, string $database): string
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));
Expand Down

0 comments on commit 2a3493e

Please sign in to comment.