From b1bef9a9355246163e7bacf2a871f9641fd42c8b Mon Sep 17 00:00:00 2001 From: twinh Date: Mon, 6 Sep 2021 17:00:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(Migration):=20migrations=20=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=E5=A4=84=E7=90=86=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Migration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Migration.php b/lib/Migration.php index 151f49695..6233e4454 100644 --- a/lib/Migration.php +++ b/lib/Migration.php @@ -170,7 +170,7 @@ protected function rollback($options = []) // Return migrations included target $migrationIds = array_slice($migrationIds, 0, $index + 1, true); } else { - $migrationIds = [current($migrationIds)]; + $migrationIds = $migrationIds ? [current($migrationIds)] : []; } if (!$migrationIds) {