From c0087a635745ced8b76c0dcc83adab85bfff6fdc Mon Sep 17 00:00:00 2001 From: Tony Air Date: Wed, 9 Feb 2022 22:48:10 +0200 Subject: [PATCH] FIX: mysql dump --- src/Tasks/DumpMySQL.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Tasks/DumpMySQL.php b/src/Tasks/DumpMySQL.php index 9f7026d..eff5e47 100755 --- a/src/Tasks/DumpMySQL.php +++ b/src/Tasks/DumpMySQL.php @@ -16,11 +16,15 @@ class DumpMySQL extends BuildTask { $cfg = DB::getConfig(); - ob_clean(); + try { + ob_clean(); + } catch (Exception $e) { + } header('Content-Disposition: attachment; filename="backup-'.date('d-m-Y').'.sql"'); passthru('mysqldump -u '.$cfg['username'].' --password="'.$cfg['password'].'" '.$cfg['database']); + ob_end_clean(); exit(0); } }