Skip to content

Commit

Permalink
fix(Migration): migrations 为空时处理错误
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Oct 28, 2021
1 parent b292617 commit b1bef9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b1bef9a

Please sign in to comment.