Yaffs site version 1.1
[yaffs-website] / vendor / drupal / console / src / Command / Database / DumpCommand.php
index cc5888be5b7b64c4af04bd153979ea2dce02980f..b867b517b5c8c86c99b36d5de412e3652c043310 100644 (file)
@@ -66,7 +66,7 @@ class DumpCommand extends Command
             )
             ->addOption(
                 'gz',
-                false,
+                null,
                 InputOption::VALUE_NONE,
                 $this->trans('commands.database.dump.options.gz')
             )
@@ -101,7 +101,7 @@ class DumpCommand extends Command
 
         if ($databaseConnection['driver'] == 'mysql') {
             $command = sprintf(
-                'mysqldump --user=%s --password=%s --host=%s --port=%s %s > %s',
+                'mysqldump --user="%s" --password="%s" --host="%s" --port="%s" "%s" > "%s"',
                 $databaseConnection['username'],
                 $databaseConnection['password'],
                 $databaseConnection['host'],
@@ -111,7 +111,7 @@ class DumpCommand extends Command
             );
         } elseif ($databaseConnection['driver'] == 'pgsql') {
             $command = sprintf(
-                'PGPASSWORD="%s" pg_dumpall -w -U %s -h %s -p %s -l %s -f %s',
+                'PGPASSWORD="%s" pg_dumpall -w -U "%s" -h "%s" -p "%s" -l "%s" -f "%s"',
                 $databaseConnection['password'],
                 $databaseConnection['username'],
                 $databaseConnection['host'],